package saltoIL

  1. Overview
  2. Docs
type 'a t
val compare : 'a t -> 'a t -> int

Total order

type typed_path = Types.type_expr t
val get_desc : 'a t -> 'a

Get description of path

val void : 'a t -> unit t

Drop the description

val equal : 'a t -> 'b t -> bool

Equality test between paths

val equal_id : _ t -> Id.t -> bool

Equality test between a path and an identifier

val pp : Format.formatter -> _ t -> unit

Formatter of Salto paths

val from_path : OCamlPath.t -> 'a -> Location.t -> 'a t

Constructor of path recovered from the typed OCaml AST

val from_ident : Id.t -> string list -> 'a -> 'a t

from_ident id fields desc returns the path obtained by projecting fields on the identifier id

val append : Id.t -> 'a t -> 'a t

append id path returns a new path corresponding to id.path

val split : _ t -> (Id.t * string list) list

split p returns a list of flat paths (head, names) where head is the head identifier of the sub-path and names is the list of projection names of the sub-path. NB: the returned list should contain at least one element, and if the path is non-applicative, the returned list is a singleton

val head : _ t -> Id.t

head p returns the head identifier of the path p

val fold : init:(Id.t -> 'a) -> proj:('a -> string -> 'a) -> apply:('a -> 'a -> 'a) -> _ t -> 'a
val name_loc : _ t -> string Location.loc

path_name_loc p returns the name of the path p

val lident_loc : _ t -> Longident.t Location.loc

lident_loc p return the identifier p as a longident

OCaml

Innovation. Community. Security.