package rfsm

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

Identifiers

type t = {
  1. scope : scope;
  2. id : string;
}
and scope =
  1. | Local
  2. | Global
exception Undefined of string * Location.t * t

What, where, identifier

exception Duplicate of string * Location.t * t

What, where, identifier

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

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

val mk_local : t -> t

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

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

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

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

pp fmt i prints identifier i using formatter fmt

val pp_qual : Stdlib.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.

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

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