Source

hasexp / combinator.mli

open Sexplib
open Sexp

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

val none : filter
(** [none t] returns [nil] *)

val keep : filter
(** [keep t] returns [singleton t] *)

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.