package dolmen

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dolmen_std.PathSource

Paths

Paths are used to identify constants and variables after typechecking. They are meant to identify the abstract location of where constants and variables come from. Variables are always local, whereas constants are identified by a full absolute path including all module names leading to the module defining the constant.

Type definition

Sourcetype path = string list

A path of module names. A path identifies a module, or the toplevel/implicitly global module if empty.

Sourcetype t = private
  1. | Local of {
    1. name : string;
    }
    (*

    A local path, mainly used for variables.

    *)
  2. | Absolute of {
    1. path : path;
    2. name : string;
    }
    (*

    An absolute path, containing a path to a module, and a basename.

    *)

Paths used for variables and constants.

Std functions

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

Printing function.

Creation function

Sourceval local : string -> t

Create a local path.

Sourceval global : string -> t

Create a global path.

Sourceval absolute : path -> string -> t

Create an absolute path.

Sourceval rename : (string -> string) -> t -> t

Change the basename of a path.

OCaml

Innovation. Community. Security.