summaryrefslogtreecommitdiff
path: root/lib/configuration/ast.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-19 08:47:29 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-19 08:47:29 +0100
commita9628fda0fc027c54b5ed5313a0c41731d79e41f (patch)
tree9240bc709d0f93336b20fb3d6b3b6cb2e8a35423 /lib/configuration/ast.mli
parent36e895119c80d52e0d3a3695a3cf3d93e41bcd3e (diff)
Create all the datatypes in a single time.
Use aliases for the type name for clarification
Diffstat (limited to 'lib/configuration/ast.mli')
-rw-r--r--lib/configuration/ast.mli13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/configuration/ast.mli b/lib/configuration/ast.mli
index 33d9bc8..298e2d5 100644
--- a/lib/configuration/ast.mli
+++ b/lib/configuration/ast.mli
@@ -3,19 +3,20 @@ type list' = { id : string; source : string }
val init : unit -> setting
-val get_content :
- setting -> Model.Identifier.t -> Model.Reference.t Model.Content.t option
+val get_content : setting -> Model.Identifier.t -> Model.content option
(** Get the content from the setting. *)
-val root_contents : setting -> Model.Reference.t Model.Content.t list
+val has_list : setting -> Model.Identifier.t -> bool
+(** Check whether a list with the given name is declared in the setting *)
+
+val root_contents : setting -> Model.content list
(** Extract all the content in the topological order.
Only the root content are repored in the list *)
-val register_content :
- 'a Type.Id.t -> setting -> ('a * Model.Identifier.t) Model.Content.t -> unit
+val register_content : setting -> Model.content -> unit
(** Register a content and all the associated subcontent in the top level,
- giving the possibility to fetch any content or subcontent by is’s name
+ giving the possibility to fetch any content or subcontent by its name
without traversing the whole tree each time. *)
exception BrokenLink : ('a Type.Id.t * 'a * Model.Identifier.t) -> exn