summaryrefslogtreecommitdiff
path: root/lib/model/model.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/model/model.mli')
-rw-r--r--lib/model/model.mli23
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/model/model.mli b/lib/model/model.mli
index 8c097f3..e81a844 100644
--- a/lib/model/model.mli
+++ b/lib/model/model.mli
@@ -7,7 +7,7 @@
list of {!section}s, and optionally sub-contents (a content with a parent is
a subcontent). Each section groups a list of {!field}s. A field has a name,
a label translated in several languages, a {!typ} — text, integer, or a
- reference to another content or to a static {!List.t} (single or
+ reference to another content or to a static {!DataList.t} (single or
multivalued) — and optional validation rules expressed in a small expression
language (see {!Dsl}).
@@ -41,8 +41,8 @@
- {!Content}, {!Section}, {!Field} — the structure of the model.
- {!Typ} — the field types, and the values carried by fields.
- {!Reference} — a link from a reference field to its target content.
- - {!List} — a static list declared in the configuration: referenceable, but
- not editable by the user.
+ - {!DataList} — a static list declared in the configuration: referenceable,
+ but not editable by the user.
- {!Dsl} — the expression language used in validation rules and display
criteria.
@@ -72,9 +72,13 @@ module Content = Content
{!Content.parent} / {!Content.root}; iterate over all its fields with
{!Content.fields}. *)
-type target = Reference.t Typ.target
+type target = Reference.target
(** The target of a reference field, resolved: either a lazy pointer to a
- content ({!Typ.Content}) or a static {!List.t} ({!Typ.List}). *)
+ content ({!Reference.Content}) or a static {!DataList.t}
+ ({!Reference.List}). *)
+
+type list = target Data_list.t
+(** A static list, resolved: its fields are typed with {!target} *)
type content = target Content.t
(** A content : the element produced by the configuration loader and manipulated
@@ -114,10 +118,11 @@ module Reference = Reference
type reference = target Typ.reference
(** A reference field target: a {!target}, plus optional constraints *)
-module List = List
-(** A static list declared in the configuration: its entries are loaded from a
- source (e.g. a CSV file) and the list can be referenced from fields, but it
- is not editable by the user. *)
+module DataList = Data_list
+(** A static list declared in the configuration: its entries are loaded by the
+ data provider and the list can be referenced from fields, but it is not
+ editable by the user. Lists have their own fields (no sections); a reference
+ field in a list can only target another list. *)
module Section = Section
(** A group of fields displayed together, with a per-language [label] and an