diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-11-19 09:57:49 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-11-19 09:57:49 +0100 |
| commit | e1bf7686f408b52a870d4ed4f3c565dbbcc3954f (patch) | |
| tree | ee7e156032cc0c43ca10879051e64c3dfeab1515 /lib/model/typ.ml | |
| parent | a9628fda0fc027c54b5ed5313a0c41731d79e41f (diff) | |
Management of lists in the settings
Diffstat (limited to 'lib/model/typ.ml')
| -rw-r--r-- | lib/model/typ.ml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/model/typ.ml b/lib/model/typ.ml index 0e94378..9427b86 100644 --- a/lib/model/typ.ml +++ b/lib/model/typ.ml @@ -1,7 +1,16 @@ +(** The target of a reference field: either a content or a static list. + + Only the content side is parameterized: this module cannot depend on + [Reference] (module cycle through [Content] and [Field]), whereas [List] + only depends on [Identifier] and can be fixed here. At the resolved level + (see {!Model.target}) ['c = Reference.t]. *) +type 'c target = + | Content of 'c + | List of List.t + type 'a reference = { t : 'a; - (** The target of the reference: a [Model.Reference.t], a lazy pointer to - the content. *) + (** The target of the reference: a {!target} at the resolved level. *) constraints : string list Dsl.t option; (** Optionally restrict the values allowed for this field, as a DSL expression read from the optional ["constraints"] key of the |
