From a9628fda0fc027c54b5ed5313a0c41731d79e41f Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Thu, 19 Nov 2026 08:47:29 +0100 Subject: Create all the datatypes in a single time. Use aliases for the type name for clarification --- lib/configuration/ast.mli | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib/configuration/ast.mli') 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 -- cgit v1.2.3