diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-07-12 17:55:27 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-07-12 17:56:11 -0300 |
| commit | b4a2485afbf74e99e2147086fbca0568b7e2b7b8 (patch) | |
| tree | f2f0f653c7de2d5a1b1565d0ec48c46dec580a5a /lib/term.mli | |
| parent | b7ab0a9d1f0275db32a526faf7cffe9d520b15c8 (diff) | |
| download | SOL-b4a2485afbf74e99e2147086fbca0568b7e2b7b8.tar.gz SOL-b4a2485afbf74e99e2147086fbca0568b7e2b7b8.zip | |
relation references as a term kind, written #Name
Diffstat (limited to '')
| -rw-r--r-- | lib/term.mli | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/term.mli b/lib/term.mli index cf79d89..8dc201e 100644 --- a/lib/term.mli +++ b/lib/term.mli @@ -17,6 +17,11 @@ type t = private its minimal shape, so integer membership inclusion holds literally. *) | String of string + | Reference of string + (** A relation reference, written [#Name]: a first-class + value denoting a relation by name, resolved through the + catalog of a state. Distinct from {!String} on purpose; + identity is not representation. *) | Nil (** The empty sequence, written [#()]. *) | Record of t Label.Map.t (** A nonempty labeled tuple. Attribute order is canonical @@ -30,6 +35,10 @@ val nil : t (** The empty sequence, [#()]. The distinguished base every {!sequence} chain ends in. *) +val reference : string -> (t, [ `Invalid_reference of string ]) result +(** A relation reference. Validates the name: a letter, then + letters, digits, or underscores. *) + val rational : num:Z.t -> den:Z.t -> (t, [ `Zero_denominator ]) result (** Normalizes on entry: reduces by the gcd, moves the sign to the numerator, and collapses to {!Integer} when the reduced |
