package rfsm

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

Module Rfsm.IdentSource

Identifiers

Sourcetype t = {
  1. scope : scope;
  2. id : string;
}
Sourceand scope =
  1. | Local
  2. | Global
Sourceexception Undefined of string * Location.t * t

What, where, identifier

Sourceexception Duplicate of string * Location.t * t

What, where, identifier

Sourceval mk : ?scope:scope -> string -> t
Sourceval mk_global : t -> t

mk_global i is {id = i.id; scope=Global}

Sourceval mk_local : t -> t

mk_local i is {id = i.id; scope=Local}

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

upd_id f i is {id = f i.id; scope = i.scope}

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

pp fmt i prints identifier i using formatter fmt

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

For identifiers with a local scope, pp_qual fmt i is pp fmt i. For identifiers with a global scope, a leading "$" is prepended to the name.

Sourceval to_string : t -> string
Sourceval compare : t -> t -> int

Used to define sets and maps of identifiers. Warning: scope is _not_ taken into account.

OCaml

Innovation. Community. Security.