package term-indexing

  1. Overview
  2. Docs
Term indexing library

Install

Dune Dependency

Authors

Maintainers

Sources

0.0.1.tar.gz
md5=9ba5dcf909fde539e173daf8f13abffd
sha512=e84fb1104c420db346181416a1e95e60aeb1b757ed7456a6028a6dfd5096bb7888af7c1ad6ea1acb25e99318e86d1f75c82a072bbdc3ba8218e5b16778199dfe

doc/term-indexing/Term_indexing/Path/index.html

Module Term_indexing.PathSource

Sourcetype t = private
  1. | Root
    (*

    Root corresponds to the empty path.

    *)
  2. | At_index of int * t
    (*

    At_index(i, p) corresponds to the ith subterm corresponding to the term at path p.

    *)

The type of backward paths. A value of type t describes a path from a subterm to the root.

Sourcetype forward = int list

The type of forward paths. A value of type forward describes a path from the root to a subterm.

Sourceval root : t

root is Root

Sourceval at_index : int -> t -> t

at_index i p is At_index (i, p).

Sourceval concat : above:t -> under:t -> t

concat above under is the path obtained by concatenating above and under.

Sourceval reverse : t -> forward

reverse p is the forward path corresponding to the backward path p.

Sourceval compare : t -> t -> int

compare is a total order.

Sourceval equal : t -> t -> bool

equal s1 s2 tests whether s1 and s2 are equal.

Sourceval hash : t -> int

hash s is a hash of s.

Sourceval pp : Format.formatter -> t -> unit

pp fmt s prints a representation of s to the formatter fmt.

Sourceval to_string : t -> string
OCaml

Innovation. Community. Security.