package hardcaml

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

Module Hardcaml.ManglerSource

Map a set of names to a set of unique names.

Sourcetype t

A mangler is a mapping from strings to the next available integer which should be added to the name to make it unique.

Sourceval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
Sourceval create : case_sensitive:Base.Bool.t -> t

Create a new mangler.

Sourceval add_identifier : t -> Base.String.t -> [ `Ok | `Duplicate ]
Sourceval add_identifiers_exn : t -> Base.String.t Base.List.t -> Base.Unit.t

Add a list of identifiers to the mangler table. Raises if an identifier is already in the table.

Test if the string is in the mangler, and return its mangler index if it is.

mangle t name returns a unique, mangled name.