module Path: sig
.. end
internal canonical long identifiers
type
t
val compare : t -> t -> int
val pp : Format.formatter -> t -> unit
val from_id : Ident.t -> t
val mk_path : Name.t list -> Name.t -> t
val mk_path_list : Name.t list -> t
mk_path_list names
splits names into ns @ [n]
and calls
mk_path ns n
. It fails, if names
is empty.
val get_module_path : t -> t option
get_module_path p
returns the module path of path p
. If
if is a path of an identifier m0. ... . mn . f
, then get_module
returns the module path m0. ... . mn
. If the path does not have
a module prefix, i.e. if it is a single name f
, None
is returned.
val natpath : t
val listpath : t
val vectorpath : t
val boolpath : t
val bitpath : t
val setpath : t
val stringpath : t
val unitpath : t
val charpath : t
val numeralpath : t
val get_name : t -> Name.t
val get_toplevel_name : t -> Name.t
get_toplevel_name p
gets the outmost name of a path. This is important
when checking prefixes. For example, the result for path module.submodule.name
is
module
and for name
it is name
.
val check_prefix : Name.t -> t -> bool
val to_ident : Ast.lex_skips -> t -> Ident.t
val to_name : t -> Name.t
val to_name_list : t -> Name.t list * Name.t
val to_string : t -> string