package dolmen

  1. Overview
  2. Docs
Module type
Class type


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

type path = string list

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

type 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

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

Printing function.

Creation function

val local : string -> t

Create a local path.

val global : string -> t

Create a global path.

val absolute : path -> string -> t

Create an absolute path.

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

Change the basename of a path.