From e1bf7686f408b52a870d4ed4f3c565dbbcc3954f Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Thu, 19 Nov 2026 09:57:49 +0100 Subject: Management of lists in the settings --- lib/configuration/ast.mli | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/configuration/ast.mli') diff --git a/lib/configuration/ast.mli b/lib/configuration/ast.mli index 298e2d5..ce5d1b6 100644 --- a/lib/configuration/ast.mli +++ b/lib/configuration/ast.mli @@ -1,13 +1,15 @@ type setting -type list' = { id : string; source : string } val init : unit -> setting val get_content : setting -> Model.Identifier.t -> Model.content option (** Get the content from the setting. *) -val has_list : setting -> Model.Identifier.t -> bool -(** Check whether a list with the given name is declared in the setting *) +val get_list : setting -> Model.Identifier.t -> Model.List.t option +(** Get the list declared with the given name, if any *) + +val lists : setting -> Model.List.t list +(** All the lists declared in the setting *) val root_contents : setting -> Model.content list (** Extract all the content in the topological order. @@ -20,12 +22,10 @@ val register_content : setting -> Model.content -> unit without traversing the whole tree each time. *) exception BrokenLink : ('a Type.Id.t * 'a * Model.Identifier.t) -> exn -(** Exception raised when a reference in the configuration targets a - non-existing content *) - -exception NotImplemented : ('a Type.Id.t * 'a * Model.Identifier.t) -> exn +(** Exception raised when a reference in the configuration targets neither an + existing content nor a declared list *) -val register_list : setting -> list' -> setting +val register_list : setting -> Model.List.t -> setting val check : setting -> (unit, exn) result (** Check the setting and return the the error as an exception *) -- cgit v1.2.3