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>
-
LLéo Andrès <contact@ndrs.fr>
-
AArthur Carcano <arthur.carcano@ocamlpro.com>
-
PPierre Chambart <pierre.chambart@ocamlpro.com>
-
JJosé Fragoso Santos <jose.fragoso@tecnico.ulisboa.pt>
Maintainers
Sources
md5=3331d81d933a176492ff37e6e7a73e10
sha512=d0b51abea60fd83d0395a22fba32ad2cda63ffb294f7d9d1035c7cc37aa744bfd8e1ae95b07cc743ef8f29ca9ced109bb5a7805ecfda0187b24e90724ef92fc3
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.