package ego

  1. Overview
  2. Docs

Module Generic.QuerySource

The module Query encodes generic patterns (for both matching and transformation) over expressions and is part of Ego.Generic's API for expressing rewrites.

Sourcetype 'sym t

Represents a query over expressions in a language with operators of type 'sym.

Sourceval of_sexp : (string -> 'a) -> Sexplib0.Sexp.t -> 'a t

of_sexp f s constructs a query from a sexpression s using f to convert operator tags.

Sourceval to_sexp : ('a -> string) -> 'a t -> Sexplib0.Sexp.t

to_sexp f q converts a query q to a sexpression using f to convert operators in the query to strings.

Sourceval pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit

pp f fmt q pretty prints a query q using f to print the operators within the query.

Sourceval show : (Format.formatter -> 'a -> unit) -> 'a t -> string

show f q prints a query q to string using f to print operators within the query.

OCaml

Innovation. Community. Security.