summaryrefslogtreecommitdiff
path: root/lib/configuration/ast.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-18 20:24:52 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-18 21:57:48 +0100
commit62123e577ee5d4066d53f8ad7e5ac3d2eb190430 (patch)
treef569686630681a9eceb2685f69b55fe5a2bac17c /lib/configuration/ast.mli
parent7087a0c2c84e796e474784cbd28d4a4e574cf2c0 (diff)
Securized the queries in the database with a dedicated type for the Identifiers
Diffstat (limited to 'lib/configuration/ast.mli')
-rw-r--r--lib/configuration/ast.mli9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/configuration/ast.mli b/lib/configuration/ast.mli
index 9fba7f6..33d9bc8 100644
--- a/lib/configuration/ast.mli
+++ b/lib/configuration/ast.mli
@@ -3,7 +3,8 @@ type list' = { id : string; source : string }
val init : unit -> setting
-val get_content : setting -> string -> Model.Reference.t Model.Content.t option
+val get_content :
+ setting -> Model.Identifier.t -> Model.Reference.t Model.Content.t option
(** Get the content from the setting. *)
val root_contents : setting -> Model.Reference.t Model.Content.t list
@@ -12,16 +13,16 @@ val root_contents : setting -> Model.Reference.t Model.Content.t list
Only the root content are repored in the list *)
val register_content :
- 'a Type.Id.t -> setting -> ('a * string) Model.Content.t -> unit
+ 'a Type.Id.t -> setting -> ('a * Model.Identifier.t) Model.Content.t -> 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
without traversing the whole tree each time. *)
-exception BrokenLink : ('a Type.Id.t * 'a * string) -> exn
+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 * string) -> exn
+exception NotImplemented : ('a Type.Id.t * 'a * Model.Identifier.t) -> exn
val register_list : setting -> list' -> setting