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/configuration/ast.mli | |
| parent | a9628fda0fc027c54b5ed5313a0c41731d79e41f (diff) | |
Management of lists in the settings
Diffstat (limited to 'lib/configuration/ast.mli')
| -rw-r--r-- | lib/configuration/ast.mli | 16 |
1 files changed, 8 insertions, 8 deletions
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 *) |
