Source

hasexp / combinator.mli

Full commit
open Sexplib
open Sexp

type filter = Sexp.t -> Sexp.t Zlist.t

val none : filter
val keep : filter
val atom : filter
val list : filter
val children : filter

val (^.) : filter -> filter -> filter
val (|||) : filter -> filter -> filter

val with_ : filter -> filter -> filter
val without : filter -> filter -> filter

val ( /> ) : filter -> filter -> filter
val ( </ ) : filter -> filter -> filter

val if_ : filter -> then_:filter -> else_:filter -> filter

val ( |>| ) : filter -> filter -> filter

val deep : filter -> filter
val deepest : filter -> filter

module Xml : sig
  val pcdata : filter
  val tag : filter
  val tag_named : string -> filter
  val tag_p : (string -> bool) -> filter 

  val contents : filter
  val attrs : filter
  val filter_attrs : (string -> string -> bool) -> filter
  val filter_map_attrs : (string -> string -> Sexp.t option) -> filter
  val assoc_attrs : string -> filter

  val assoc_attrs_conv : string -> (string -> 'a) -> Sexp.t -> 'a

  module Make : sig
    val pcdata : string -> Sexp.t
    val tag : string -> attrs:Sexp.t list -> Sexp.t list -> Sexp.t
  end
end

module Caml : sig
  val string : string -> Sexp.t
  val record_elt : string -> Sexp.t -> Sexp.t
end