package tyxml-syntax

  1. Overview
  2. Docs
val find : ('a -> bool) -> 'a list -> 'a option

Similar to List.find, but evaluates to an option instead of raising Not_found.

Markup language

type lang =
  1. | Html
  2. | Svg
val lang : lang -> string
val implementation : lang -> string
val set_implementation : lang -> string -> unit
type name = lang * string
val make_lid : loc:Ppxlib.Location.t -> lang -> string -> Ppxlib.Longident.t Ppxlib.Location.loc
val make : loc:Ppxlib.Location.t -> lang -> string -> Ppxlib.expression

Expression helpers.

val int : Ppxlib.Location.t -> int -> Ppxlib.expression
val float : Ppxlib.Location.t -> float -> Ppxlib.expression
val string : Ppxlib.Location.t -> string -> Ppxlib.expression
val list : Ppxlib.Location.t -> Ppxlib.expression list -> Ppxlib.expression
val list_wrap : lang -> Ppxlib.Location.t -> Ppxlib.expression list -> Ppxlib.expression
val wrap : lang -> Ppxlib.Location.t -> Ppxlib.expression -> Ppxlib.expression

wrap implementation loc e creates a parse tree for implementation.Xml.W.return e.

type 'a value =
  1. | Val of 'a
  2. | Antiquot of Ppxlib.expression
val map_value : ('a -> 'b) -> 'a value -> 'b value
val value : 'a -> 'a value
val antiquot : Ppxlib.expression -> _ value
val wrap_value : lang -> Ppxlib.Location.t -> Ppxlib.expression value -> Ppxlib.expression
val list_wrap_value : lang -> Ppxlib.Location.t -> Ppxlib.expression value list -> Ppxlib.expression
val error : Ppxlib.Location.t -> ('b, Stdlib.Format.formatter, unit, 'a) Stdlib.format4 -> 'b
val txt : loc:Ppxlib.Location.t -> lang:lang -> string -> Ppxlib.expression
OCaml

Innovation. Community. Security.