diff --git a/dev/ezcurl-lwt/Ezcurl_lwt/index.html b/dev/ezcurl-lwt/Ezcurl_lwt/index.html index 4bbb3e6..bd0580d 100644 --- a/dev/ezcurl-lwt/Ezcurl_lwt/index.html +++ b/dev/ezcurl-lwt/Ezcurl_lwt/index.html @@ -1,37 +1,37 @@ -Ezcurl_lwt (ezcurl-lwt.Ezcurl_lwt)

Module Ezcurl_lwt

include module type of struct include Ezcurl_core end
module Config = Ezcurl_core.Config

Configuration for the client.

type t = Curl.t

A client, i.e. a cURL instance.

val make : ?set_opts:(t -> unit) -> unit -> t

Create a new client.

  • parameter set_opts

    called before returning the client, to set options

val delete : t -> unit

Delete the client. It cannot be used anymore.

val with_client : ?set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup.

type response_info = Ezcurl_core.response_info = {
  1. ri_response_time : float;
    (*

    Total time (in seconds) for the request/response pair. See Curl.get_totaltime.

    *)
  2. ri_redirect_count : int;
    (*

    Number of redirects cURL followed. See Curl.get_redirectcount.

    *)
}

Metadata about a response from the server.

val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = Ezcurl_core.response = {
  1. code : int;
    (*

    Response code. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

    *)
  2. headers : (string * string) list;
    (*

    Response headers

    *)
  3. body : string;
    (*

    Response body, or ""

    *)
  4. info : response_info;
    (*

    Information about the response

    *)
}

Response for a given request.

val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth = Ezcurl_core.meth =
  1. | GET
  2. | POST of Curl.curlHTTPPost list
  3. | PUT
  4. | DELETE
  5. | HEAD
  6. | CONNECT
  7. | OPTIONS
  8. | TRACE
  9. | PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = Ezcurl_core.IO
module type S = Ezcurl_core.S
module Make = Ezcurl_core.Make
include sig ... end
type 'a0 io = 'a Lwt.t
val http : - ?tries:int -> - ?client:Ezcurl_core.t -> - ?config:Ezcurl_core.Config.t -> - ?range:string -> - ?content:[ `String of string | `Write of bytes -> int -> int ] -> - ?headers:(string * string) list -> - url:string -> - meth:Ezcurl_core.meth -> +Ezcurl_lwt (ezcurl-lwt.Ezcurl_lwt)

Module Ezcurl_lwt

include module type of struct include Ezcurl_core end
module Config = Ezcurl_core.Config

Configuration for the client.

type t = Curl.t

A client, i.e. a cURL instance.

val make : ?set_opts:(t -> unit) -> unit -> t

Create a new client.

  • parameter set_opts

    called before returning the client, to set options

val delete : t -> unit

Delete the client. It cannot be used anymore.

val with_client : ?set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup.

type response_info = Ezcurl_core.response_info = {
  1. ri_response_time : float;
    (*

    Total time (in seconds) for the request/response pair. See Curl.get_totaltime.

    *)
  2. ri_redirect_count : int;
    (*

    Number of redirects cURL followed. See Curl.get_redirectcount.

    *)
}

Metadata about a response from the server.

val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = Ezcurl_core.response = {
  1. code : int;
    (*

    Response code. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

    *)
  2. headers : (string * string) list;
    (*

    Response headers

    *)
  3. body : string;
    (*

    Response body, or ""

    *)
  4. info : response_info;
    (*

    Information about the response

    *)
}

Response for a given request.

val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth = Ezcurl_core.meth =
  1. | GET
  2. | POST of Curl.curlHTTPPost list
  3. | PUT
  4. | DELETE
  5. | HEAD
  6. | CONNECT
  7. | OPTIONS
  8. | TRACE
  9. | PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = Ezcurl_core.IO
module type S = Ezcurl_core.S
module Make = Ezcurl_core.Make
include sig ... end
type 'a0 io = 'a Lwt.t
val http : + ?tries:int -> + ?client:Ezcurl_core.t -> + ?config:Ezcurl_core.Config.t -> + ?range:string -> + ?content:[ `String of string | `Write of bytes -> int -> int ] -> + ?headers:(string * string) list -> + url:string -> + meth:Ezcurl_core.meth -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val get : - ?tries:int -> - ?client:Ezcurl_core.t -> - ?config:Ezcurl_core.Config.t -> - ?range:string -> - ?headers:(string * string) list -> - url:string -> + ?tries:int -> + ?client:Ezcurl_core.t -> + ?config:Ezcurl_core.Config.t -> + ?range:string -> + ?headers:(string * string) list -> + url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val put : - ?tries:int -> - ?client:Ezcurl_core.t -> - ?config:Ezcurl_core.Config.t -> - ?headers:(string * string) list -> - url:string -> - content:[ `String of string | `Write of bytes -> int -> int ] -> + ?tries:int -> + ?client:Ezcurl_core.t -> + ?config:Ezcurl_core.Config.t -> + ?headers:(string * string) list -> + url:string -> + content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val post : - ?tries:int -> - ?client:Ezcurl_core.t -> - ?config:Ezcurl_core.Config.t -> - ?headers:(string * string) list -> - ?content:[ `String of string | `Write of bytes -> int -> int ] -> - params:Curl.curlHTTPPost list -> - url:string -> + ?tries:int -> + ?client:Ezcurl_core.t -> + ?config:Ezcurl_core.Config.t -> + ?headers:(string * string) list -> + ?content:[ `String of string | `Write of bytes -> int -> int ] -> + params:Curl.curlHTTPPost list -> + url:string -> unit -> - (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
\ No newline at end of file + (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
diff --git a/dev/ezcurl-lwt/index.html b/dev/ezcurl-lwt/index.html index 82cefb3..4749376 100644 --- a/dev/ezcurl-lwt/index.html +++ b/dev/ezcurl-lwt/index.html @@ -1,2 +1,2 @@ -index (ezcurl-lwt.index)

ezcurl-lwt index

Library ezcurl-lwt

The entry point of this library is the module: Ezcurl_lwt.

\ No newline at end of file +index (ezcurl-lwt.index)

ezcurl-lwt index

Library ezcurl-lwt

The entry point of this library is the module: Ezcurl_lwt.

diff --git a/dev/ezcurl/Ezcurl/index.html b/dev/ezcurl/Ezcurl/index.html index cb218a4..9883739 100644 --- a/dev/ezcurl/Ezcurl/index.html +++ b/dev/ezcurl/Ezcurl/index.html @@ -1,37 +1,37 @@ -Ezcurl (ezcurl.Ezcurl)

Module Ezcurl

Synchronous API

include module type of struct include Ezcurl_core end
module Config = Ezcurl_core.Config

Configuration for the client.

type t = Curl.t

A client, i.e. a cURL instance.

val make : ?set_opts:(t -> unit) -> unit -> t

Create a new client.

  • parameter set_opts

    called before returning the client, to set options

val delete : t -> unit

Delete the client. It cannot be used anymore.

val with_client : ?set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup.

type response_info = Ezcurl_core.response_info = {
  1. ri_response_time : float;
    (*

    Total time (in seconds) for the request/response pair. See Curl.get_totaltime.

    *)
  2. ri_redirect_count : int;
    (*

    Number of redirects cURL followed. See Curl.get_redirectcount.

    *)
}

Metadata about a response from the server.

val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = Ezcurl_core.response = {
  1. code : int;
    (*

    Response code. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

    *)
  2. headers : (string * string) list;
    (*

    Response headers

    *)
  3. body : string;
    (*

    Response body, or ""

    *)
  4. info : response_info;
    (*

    Information about the response

    *)
}

Response for a given request.

val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth = Ezcurl_core.meth =
  1. | GET
  2. | POST of Curl.curlHTTPPost list
  3. | PUT
  4. | DELETE
  5. | HEAD
  6. | CONNECT
  7. | OPTIONS
  8. | TRACE
  9. | PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = Ezcurl_core.IO
module type S = Ezcurl_core.S
module Make = Ezcurl_core.Make
include sig ... end
type 'a0 io = 'a
val http : - ?tries:int -> - ?client:Ezcurl_core.t -> - ?config:Ezcurl_core.Config.t -> - ?range:string -> - ?content:[ `String of string | `Write of bytes -> int -> int ] -> - ?headers:(string * string) list -> - url:string -> - meth:Ezcurl_core.meth -> +Ezcurl (ezcurl.Ezcurl)

Module Ezcurl

Synchronous API

include module type of struct include Ezcurl_core end
module Config = Ezcurl_core.Config

Configuration for the client.

type t = Curl.t

A client, i.e. a cURL instance.

val make : ?set_opts:(t -> unit) -> unit -> t

Create a new client.

  • parameter set_opts

    called before returning the client, to set options

val delete : t -> unit

Delete the client. It cannot be used anymore.

val with_client : ?set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup.

type response_info = Ezcurl_core.response_info = {
  1. ri_response_time : float;
    (*

    Total time (in seconds) for the request/response pair. See Curl.get_totaltime.

    *)
  2. ri_redirect_count : int;
    (*

    Number of redirects cURL followed. See Curl.get_redirectcount.

    *)
}

Metadata about a response from the server.

val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = Ezcurl_core.response = {
  1. code : int;
    (*

    Response code. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

    *)
  2. headers : (string * string) list;
    (*

    Response headers

    *)
  3. body : string;
    (*

    Response body, or ""

    *)
  4. info : response_info;
    (*

    Information about the response

    *)
}

Response for a given request.

val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth = Ezcurl_core.meth =
  1. | GET
  2. | POST of Curl.curlHTTPPost list
  3. | PUT
  4. | DELETE
  5. | HEAD
  6. | CONNECT
  7. | OPTIONS
  8. | TRACE
  9. | PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = Ezcurl_core.IO
module type S = Ezcurl_core.S
module Make = Ezcurl_core.Make
include sig ... end
type 'a0 io = 'a
val http : + ?tries:int -> + ?client:Ezcurl_core.t -> + ?config:Ezcurl_core.Config.t -> + ?range:string -> + ?content:[ `String of string | `Write of bytes -> int -> int ] -> + ?headers:(string * string) list -> + url:string -> + meth:Ezcurl_core.meth -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val get : - ?tries:int -> - ?client:Ezcurl_core.t -> - ?config:Ezcurl_core.Config.t -> - ?range:string -> - ?headers:(string * string) list -> - url:string -> + ?tries:int -> + ?client:Ezcurl_core.t -> + ?config:Ezcurl_core.Config.t -> + ?range:string -> + ?headers:(string * string) list -> + url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val put : - ?tries:int -> - ?client:Ezcurl_core.t -> - ?config:Ezcurl_core.Config.t -> - ?headers:(string * string) list -> - url:string -> - content:[ `String of string | `Write of bytes -> int -> int ] -> + ?tries:int -> + ?client:Ezcurl_core.t -> + ?config:Ezcurl_core.Config.t -> + ?headers:(string * string) list -> + url:string -> + content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val post : - ?tries:int -> - ?client:Ezcurl_core.t -> - ?config:Ezcurl_core.Config.t -> - ?headers:(string * string) list -> - ?content:[ `String of string | `Write of bytes -> int -> int ] -> - params:Curl.curlHTTPPost list -> - url:string -> + ?tries:int -> + ?client:Ezcurl_core.t -> + ?config:Ezcurl_core.Config.t -> + ?headers:(string * string) list -> + ?content:[ `String of string | `Write of bytes -> int -> int ] -> + params:Curl.curlHTTPPost list -> + url:string -> unit -> - (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
\ No newline at end of file + (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
diff --git a/dev/ezcurl/Ezcurl_core/Config/index.html b/dev/ezcurl/Ezcurl_core/Config/index.html index 0dde025..dba2174 100644 --- a/dev/ezcurl/Ezcurl_core/Config/index.html +++ b/dev/ezcurl/Ezcurl_core/Config/index.html @@ -1,2 +1,2 @@ -Config (ezcurl.Ezcurl_core.Config)

Module Ezcurl_core.Config

Configuration for the client.

type t
val default : t
val verbose : bool -> t -> t
val authmethod : Curl.curlAuth list -> t -> t
val max_redirects : int -> t -> t
val follow_location : bool -> t -> t
val username : string -> t -> t
val password : string -> t -> t
val pp : Stdlib.Format.formatter -> t -> unit
val to_string : t -> string
\ No newline at end of file +Config (ezcurl.Ezcurl_core.Config)

Module Ezcurl_core.Config

Configuration for the client.

type t
val default : t
val verbose : bool -> t -> t
val authmethod : Curl.curlAuth list -> t -> t
val max_redirects : int -> t -> t
val follow_location : bool -> t -> t
val username : string -> t -> t
val password : string -> t -> t
val pp : Stdlib.Format.formatter -> t -> unit
val to_string : t -> string
diff --git a/dev/ezcurl/Ezcurl_core/Make/argument-1-IO/index.html b/dev/ezcurl/Ezcurl_core/Make/argument-1-IO/index.html index b29f10d..31f8a5e 100644 --- a/dev/ezcurl/Ezcurl_core/Make/argument-1-IO/index.html +++ b/dev/ezcurl/Ezcurl_core/Make/argument-1-IO/index.html @@ -1,2 +1,2 @@ -IO (ezcurl.Ezcurl_core.Make.IO)

Parameter Make.IO

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
\ No newline at end of file +IO (ezcurl.Ezcurl_core.Make.IO)

Parameter Make.IO

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
diff --git a/dev/ezcurl/Ezcurl_core/Make/index.html b/dev/ezcurl/Ezcurl_core/Make/index.html index d9851fc..f83d9f7 100644 --- a/dev/ezcurl/Ezcurl_core/Make/index.html +++ b/dev/ezcurl/Ezcurl_core/Make/index.html @@ -1,37 +1,37 @@ -Make (ezcurl.Ezcurl_core.Make)

Module Ezcurl_core.Make

Parameters

module IO : IO

Signature

type 'a io = 'a IO.t
val http : - ?tries:int -> - ?client:t -> - ?config:Config.t -> - ?range:string -> - ?content:[ `String of string | `Write of bytes -> int -> int ] -> - ?headers:(string * string) list -> - url:string -> - meth:meth -> +Make (ezcurl.Ezcurl_core.Make)

Module Ezcurl_core.Make

Parameters

module IO : IO

Signature

type 'a io = 'a IO.t
val http : + ?tries:int -> + ?client:t -> + ?config:Config.t -> + ?range:string -> + ?content:[ `String of string | `Write of bytes -> int -> int ] -> + ?headers:(string * string) list -> + url:string -> + meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

  • parameter url

    the URL to query

  • parameter meth

    which method to use (see meth)

  • parameter tries

    how many times to retry in case of CURLE_AGAIN code

  • parameter client

    a client to reuse (instead of allocating a new one)

  • parameter range

    an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

  • parameter config

    configuration to set

  • parameter content

    the content to send as the query's body, either a `String s to write a single string, or `Write f where f is a callback that is called on a buffer b with len n (as in f b n) and returns how many bytes it wrote in the buffer b starting at index 0 (at most n bytes). It must return 0 when the content is entirely written, and not before.

  • parameter headers

    headers of the query

val get : - ?tries:int -> - ?client:t -> - ?config:Config.t -> - ?range:string -> - ?headers:(string * string) list -> - url:string -> + ?tries:int -> + ?client:t -> + ?config:Config.t -> + ?range:string -> + ?headers:(string * string) list -> + url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : - ?tries:int -> - ?client:t -> - ?config:Config.t -> - ?headers:(string * string) list -> - url:string -> - content:[ `String of string | `Write of bytes -> int -> int ] -> + ?tries:int -> + ?client:t -> + ?config:Config.t -> + ?headers:(string * string) list -> + url:string -> + content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : - ?tries:int -> - ?client:t -> - ?config:Config.t -> - ?headers:(string * string) list -> - ?content:[ `String of string | `Write of bytes -> int -> int ] -> - params:Curl.curlHTTPPost list -> - url:string -> + ?tries:int -> + ?client:t -> + ?config:Config.t -> + ?headers:(string * string) list -> + ?content:[ `String of string | `Write of bytes -> int -> int ] -> + params:Curl.curlHTTPPost list -> + url:string -> unit -> - (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file + (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

diff --git a/dev/ezcurl/Ezcurl_core/index.html b/dev/ezcurl/Ezcurl_core/index.html index de71994..5fd10ef 100644 --- a/dev/ezcurl/Ezcurl_core/index.html +++ b/dev/ezcurl/Ezcurl_core/index.html @@ -1,2 +1,2 @@ -Ezcurl_core (ezcurl.Ezcurl_core)

Module Ezcurl_core

Core signatures and implementation

module Config : sig ... end

Configuration for the client.

type t = Curl.t

A client, i.e. a cURL instance.

val make : ?set_opts:(t -> unit) -> unit -> t

Create a new client.

  • parameter set_opts

    called before returning the client, to set options

val delete : t -> unit

Delete the client. It cannot be used anymore.

val with_client : ?set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup.

type response_info = {
  1. ri_response_time : float;
    (*

    Total time (in seconds) for the request/response pair. See Curl.get_totaltime.

    *)
  2. ri_redirect_count : int;
    (*

    Number of redirects cURL followed. See Curl.get_redirectcount.

    *)
}

Metadata about a response from the server.

val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = {
  1. code : int;
    (*

    Response code. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

    *)
  2. headers : (string * string) list;
    (*

    Response headers

    *)
  3. body : string;
    (*

    Response body, or ""

    *)
  4. info : response_info;
    (*

    Information about the response

    *)
}

Response for a given request.

val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth =
  1. | GET
  2. | POST of Curl.curlHTTPPost list
  3. | PUT
  4. | DELETE
  5. | HEAD
  6. | CONNECT
  7. | OPTIONS
  8. | TRACE
  9. | PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = sig ... end
module type S = sig ... end
module Make (IO : IO) : S with type 'a io = 'a IO.t
\ No newline at end of file +Ezcurl_core (ezcurl.Ezcurl_core)

Module Ezcurl_core

Core signatures and implementation

module Config : sig ... end

Configuration for the client.

type t = Curl.t

A client, i.e. a cURL instance.

val make : ?set_opts:(t -> unit) -> unit -> t

Create a new client.

  • parameter set_opts

    called before returning the client, to set options

val delete : t -> unit

Delete the client. It cannot be used anymore.

val with_client : ?set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup.

type response_info = {
  1. ri_response_time : float;
    (*

    Total time (in seconds) for the request/response pair. See Curl.get_totaltime.

    *)
  2. ri_redirect_count : int;
    (*

    Number of redirects cURL followed. See Curl.get_redirectcount.

    *)
}

Metadata about a response from the server.

val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = {
  1. code : int;
    (*

    Response code. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

    *)
  2. headers : (string * string) list;
    (*

    Response headers

    *)
  3. body : string;
    (*

    Response body, or ""

    *)
  4. info : response_info;
    (*

    Information about the response

    *)
}

Response for a given request.

val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth =
  1. | GET
  2. | POST of Curl.curlHTTPPost list
  3. | PUT
  4. | DELETE
  5. | HEAD
  6. | CONNECT
  7. | OPTIONS
  8. | TRACE
  9. | PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = sig ... end
module type S = sig ... end
module Make (IO : IO) : S with type 'a io = 'a IO.t
diff --git a/dev/ezcurl/Ezcurl_core/module-type-IO/index.html b/dev/ezcurl/Ezcurl_core/module-type-IO/index.html index 51acfc5..702056a 100644 --- a/dev/ezcurl/Ezcurl_core/module-type-IO/index.html +++ b/dev/ezcurl/Ezcurl_core/module-type-IO/index.html @@ -1,2 +1,2 @@ -IO (ezcurl.Ezcurl_core.IO)

Module type Ezcurl_core.IO

Underlying IO Monad

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
\ No newline at end of file +IO (ezcurl.Ezcurl_core.IO)

Module type Ezcurl_core.IO

Underlying IO Monad

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
diff --git a/dev/ezcurl/Ezcurl_core/module-type-S/index.html b/dev/ezcurl/Ezcurl_core/module-type-S/index.html index 4fbaddb..4ff5e45 100644 --- a/dev/ezcurl/Ezcurl_core/module-type-S/index.html +++ b/dev/ezcurl/Ezcurl_core/module-type-S/index.html @@ -1,37 +1,37 @@ -S (ezcurl.Ezcurl_core.S)

Module type Ezcurl_core.S

Main Signature

type 'a io
val http : - ?tries:int -> - ?client:t -> - ?config:Config.t -> - ?range:string -> - ?content:[ `String of string | `Write of bytes -> int -> int ] -> - ?headers:(string * string) list -> - url:string -> - meth:meth -> +S (ezcurl.Ezcurl_core.S)

Module type Ezcurl_core.S

Main Signature

type 'a io
val http : + ?tries:int -> + ?client:t -> + ?config:Config.t -> + ?range:string -> + ?content:[ `String of string | `Write of bytes -> int -> int ] -> + ?headers:(string * string) list -> + url:string -> + meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

  • parameter url

    the URL to query

  • parameter meth

    which method to use (see meth)

  • parameter tries

    how many times to retry in case of CURLE_AGAIN code

  • parameter client

    a client to reuse (instead of allocating a new one)

  • parameter range

    an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

  • parameter config

    configuration to set

  • parameter content

    the content to send as the query's body, either a `String s to write a single string, or `Write f where f is a callback that is called on a buffer b with len n (as in f b n) and returns how many bytes it wrote in the buffer b starting at index 0 (at most n bytes). It must return 0 when the content is entirely written, and not before.

  • parameter headers

    headers of the query

val get : - ?tries:int -> - ?client:t -> - ?config:Config.t -> - ?range:string -> - ?headers:(string * string) list -> - url:string -> + ?tries:int -> + ?client:t -> + ?config:Config.t -> + ?range:string -> + ?headers:(string * string) list -> + url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : - ?tries:int -> - ?client:t -> - ?config:Config.t -> - ?headers:(string * string) list -> - url:string -> - content:[ `String of string | `Write of bytes -> int -> int ] -> + ?tries:int -> + ?client:t -> + ?config:Config.t -> + ?headers:(string * string) list -> + url:string -> + content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : - ?tries:int -> - ?client:t -> - ?config:Config.t -> - ?headers:(string * string) list -> - ?content:[ `String of string | `Write of bytes -> int -> int ] -> - params:Curl.curlHTTPPost list -> - url:string -> + ?tries:int -> + ?client:t -> + ?config:Config.t -> + ?headers:(string * string) list -> + ?content:[ `String of string | `Write of bytes -> int -> int ] -> + params:Curl.curlHTTPPost list -> + url:string -> unit -> - (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file + (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

diff --git a/dev/ezcurl/index.html b/dev/ezcurl/index.html index fcb6ff3..30647c4 100644 --- a/dev/ezcurl/index.html +++ b/dev/ezcurl/index.html @@ -1,2 +1,2 @@ -index (ezcurl.index)

ezcurl index

Library ezcurl

The entry point of this library is the module: Ezcurl.

Library ezcurl.core

The entry point of this library is the module: Ezcurl_core.

\ No newline at end of file +index (ezcurl.index)

ezcurl index

Library ezcurl

The entry point of this library is the module: Ezcurl.

Library ezcurl.core

The entry point of this library is the module: Ezcurl_core.

diff --git a/dev/odoc.support/fonts/fira-mono-v14-latin-500.woff2 b/dev/odoc.support/fonts/fira-mono-v14-latin-500.woff2 new file mode 100644 index 0000000..9d07a63 Binary files /dev/null and b/dev/odoc.support/fonts/fira-mono-v14-latin-500.woff2 differ diff --git a/dev/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 b/dev/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 new file mode 100644 index 0000000..edc71a8 Binary files /dev/null and b/dev/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 differ diff --git a/dev/odoc.support/fonts/fira-sans-v17-latin-500.woff2 b/dev/odoc.support/fonts/fira-sans-v17-latin-500.woff2 new file mode 100644 index 0000000..24bb8f4 Binary files /dev/null and b/dev/odoc.support/fonts/fira-sans-v17-latin-500.woff2 differ diff --git a/dev/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 b/dev/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 new file mode 100644 index 0000000..1a8b72d Binary files /dev/null and b/dev/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 differ diff --git a/dev/odoc.support/fonts/fira-sans-v17-latin-700.woff2 b/dev/odoc.support/fonts/fira-sans-v17-latin-700.woff2 new file mode 100644 index 0000000..40b8a1c Binary files /dev/null and b/dev/odoc.support/fonts/fira-sans-v17-latin-700.woff2 differ diff --git a/dev/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 b/dev/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 new file mode 100644 index 0000000..bdf8f5f Binary files /dev/null and b/dev/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 differ diff --git a/dev/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 b/dev/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 new file mode 100644 index 0000000..b9619dd Binary files /dev/null and b/dev/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 differ diff --git a/dev/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 b/dev/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 new file mode 100644 index 0000000..d31eba8 Binary files /dev/null and b/dev/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 differ diff --git a/dev/odoc.support/fonts/noticia-text-v15-latin-700.woff2 b/dev/odoc.support/fonts/noticia-text-v15-latin-700.woff2 new file mode 100644 index 0000000..536fbe1 Binary files /dev/null and b/dev/odoc.support/fonts/noticia-text-v15-latin-700.woff2 differ diff --git a/dev/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 b/dev/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 new file mode 100644 index 0000000..9b83b07 Binary files /dev/null and b/dev/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 differ diff --git a/dev/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 b/dev/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 new file mode 100644 index 0000000..efff29f Binary files /dev/null and b/dev/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 differ diff --git a/dev/odoc.support/highlight.pack.js b/dev/odoc.support/highlight.pack.js index a373159..7d1bcd0 100644 --- a/dev/odoc.support/highlight.pack.js +++ b/dev/odoc.support/highlight.pack.js @@ -302,7 +302,238 @@ e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)} },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);/*! `xml` grammar compiled for Highlight.js 11.7.0 */ +;"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/, @@ -360,102 +591,44 @@ 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)})();/*! `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)})();/*! `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)})();/*! `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)})();/*! `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)})(); \ No newline at end of file +;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/dev/odoc.support/odoc.css b/dev/odoc.support/odoc.css index 8b0ed5a..7230f82 100644 --- a/dev/odoc.support/odoc.css +++ b/dev/odoc.support/odoc.css @@ -1,12 +1,97 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 2.2.0 */ + odoc 2.3.0 */ /* Fonts */ -@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500'); -@import url('https://fonts.googleapis.com/css?family=Noticia+Text:400,400i,700'); -@import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,500,500i,600,600i,700,700i'); +/* noticia-text-regular - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: normal; + font-weight: 400; + src: url('fonts/noticia-text-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* noticia-text-italic - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: italic; + font-weight: 400; + src: url('fonts/noticia-text-v15-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* noticia-text-700 - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: normal; + font-weight: 700; + src: url('fonts/noticia-text-v15-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-mono-regular - latin */ +@font-face { + font-family: 'Fira Mono'; + font-style: normal; + font-weight: 400; + src: url('fonts/fira-mono-v14-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-mono-500 - latin */ +@font-face { + font-family: 'Fira Mono'; + font-style: normal; + font-weight: 500; + src: url('fonts/fira-mono-v14-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-regular - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 400; + src: url('fonts/fira-sans-v17-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 400; + src: url('fonts/fira-sans-v17-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-500 - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 500; + src: url('fonts/fira-sans-v17-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-500italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 500; + src: url('fonts/fira-sans-v17-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-700 - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 700; + src: url('fonts/fira-sans-v17-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-700italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 700; + src: url('fonts/fira-sans-v17-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + :root, .light:root { @@ -14,6 +99,7 @@ --color: #333333; --link-color: #2C94BD; + --source-color: grey; --anchor-hover: #555; --anchor-color: #d5d5d5; --xref-shadow: #cc6666; @@ -33,6 +119,7 @@ --toc-list-border: #ccc; --spec-summary-border-color: #5c9cf5; + --spec-label-color: green; --spec-summary-background: var(--code-background); --spec-summary-hover-background: #ebeff2; --spec-details-after-background: rgba(0, 4, 15, 0.05); @@ -72,6 +159,8 @@ --hljs-type: #ac885b; --hljs-meta: #82aaff; --hljs-variable: #cf6a4c; + + --spec-label-color: lightgreen; } @media (prefers-color-scheme: dark) { @@ -118,6 +207,8 @@ --hljs-type: #ac885b; --hljs-meta: #82aaff; --hljs-variable: #cf6a4c; + + --spec-label-color: lightgreen; } } @@ -142,6 +233,7 @@ table { html { font-size: 15px; + scroll-behavior: smooth; } body { @@ -149,16 +241,23 @@ body { background: #FFFFFF; color: var(--color); background-color: var(--main-background); + font-family: "Noticia Text", Georgia, serif; + line-height: 1.5; } body { - max-width: 100ex; margin-left: calc(10vw + 20ex); margin-right: 4ex; margin-top: 20px; margin-bottom: 50px; - font-family: "Noticia Text", Georgia, serif; - line-height: 1.5; +} + +body.odoc { + max-width: 100ex; +} + +body.odoc-src { + margin-right: calc(10vw + 20ex); } header { @@ -238,6 +337,10 @@ a { color: var(--link-color); } +.odoc-src pre a { + color: inherit; +} + a:hover { box-shadow: 0 1px 0 0 var(--link-color); } @@ -289,6 +392,14 @@ a.anchor { 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", Helvetica, Arial, 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 */ @@ -372,32 +483,32 @@ tt, code, pre { font-weight: 400; } -pre { +.odoc pre { padding: 0.1em; border: 1px solid var(--pre-border-color); border-radius: 5px; overflow-x: auto; } -p code, -li code { +.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 { +p a > code, li a > code { color: var(--link-color); } -code { +.odoc code { white-space: pre-wrap; } /* Code blocks (e.g. Examples) */ -pre code { +.odoc pre code { font-size: 0.893rem; } @@ -419,6 +530,10 @@ pre code { padding: 0.35em 0.5em; } +.spec .label, .spec .optlabel { + color: var(--spec-label-color); +} + li:not(:last-child) > .def-doc { margin-bottom: 15px; } @@ -536,6 +651,12 @@ td.def-doc *:first-child { .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; } @@ -674,10 +795,26 @@ td.def-doc *:first-child { 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: 95ex) { - body.odoc { +@media only screen and (max-width: 110ex) { + body { margin: 2em; } .odoc-toc { @@ -704,6 +841,47 @@ td.def-doc *:first-child { } } +/* 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 { @@ -777,6 +955,34 @@ td.def-doc *:first-child { 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