package smtml
Install
dune-project
Dependency
Authors
-
JJoão Pereira <joaomhmpereira@tecnico.ulisboa.pt>
-
FFilipe Marques <filipe.s.marques@tecnico.ulisboa.pt>
-
HHichem Rami Ait El Hara <hra@ocamlpro.com>
-
Rredianthus <redopam@pm.me>
-
AArthur Carcano <arthur.carcano@ocamlpro.com>
-
PPierre Chambart <pierre.chambart@ocamlpro.com>
-
JJosé Fragoso Santos <jose.fragoso@tecnico.ulisboa.pt>
Maintainers
Sources
md5=9e0021451109a86f7ebdbc5064220c8f
sha512=9bf3ab3757a0a5d5c355950de5ea5faed3d85194bcaaef18819e1a3e74f04d75baccb86327de5bf044e9e2a031bb261e6f206372fa47b31917e0137b3490458a
doc/smtml/Smtml/Symbol/index.html
Module Smtml.SymbolSource
Symbol Module. This module defines names, namespaces, and typed symbols, providing utilities for creating, comparing, and manipulating symbols.
Name Types
The type name represents a symbol name, which can either be a simple string or an indexed name with a base name and a list of indices.
Namespace Types
The type namespace classifies symbols into different kinds of identifiers.
Symbol Types
type t = {ty : Ty.t;(*The type of the symbol.
*)name : name;(*The name of the symbol.
*)namespace : namespace;(*The namespace to which the symbol belongs.
*)
}The type t represents a symbol, consisting of a type, a name, and a namespace.
Namespace Constants
Symbol Creation
s @: ty creates a symbol with name s and type ty, belonging to the term (function, constant) namespace.
make ty s creates a symbol with type ty and name s in the term (function, constant) namespace.
make3 ty name ns creates a symbol with type ty, name name, and namespace ns.
mk ns s creates a symbol with name s in the specified namespace ns with a default type.
indexed ns basename indices creates a symbol with an indexed name, where basename is the base name and indices are the associated indices.
Symbol Accessors
Comparison
compare sym1 sym2 performs a total order comparison of sym1 and sym2.
Pretty Printing
pp_namespace fmt ns pretty-prints the namespace ns using the formatter fmt.
Serialization
to_json sym converts the symbol sym to a JSON representation.