package acgtk

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

Module IdGenerator.IdGenSource

This module is a functor that generates a identifier generator from a module implementing these identifiers

Parameters

module ID : IdType

Signature

Sourcetype id = ID.t

The type of the identifier generated

Sourcetype t

The type of the generator

Sourceval init : unit -> t

init () returns a new generator

Sourceval get_fresh_id : t -> id * t

get_fresh_id gen returnds a pair (id,gen') where id is a fresh id and gen' a new generator that knows id was already generated.

Sourceval eq : id -> id -> bool

eq id1 id2 returns true if id1=id2 and fase otherwise.

Sourceval compare : id -> id -> int

compare id1 id2 returns an integer which is 0 if id1=id2, negative of id1 is less than id2 and positive otherwise.

Sourceval id_to_string : id -> string
Sourcemodule IdMap : Map.S with type key = id

IdMap implements maps whose keys are identifiers

Table implements correspondance tables with the current identifiers

OCaml

Innovation. Community. Security.