From 7b5baa29818c9fe6e33d50c8458aa2824274158e Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 18 Nov 2026 17:52:21 +0100 Subject: Updated the configuration format --- lib/configuration/ast.ml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/configuration/ast.ml') diff --git a/lib/configuration/ast.ml b/lib/configuration/ast.ml index 5857902..36ba349 100644 --- a/lib/configuration/ast.ml +++ b/lib/configuration/ast.ml @@ -23,6 +23,7 @@ let get_content : setting -> string -> Model.Reference.t Model.Content.t option fun settings name -> Splay.find name settings.contents exception BrokenLink : ('a Type.Id.t * 'a * string) -> exn +exception NotImplemented : ('a Type.Id.t * 'a * string) -> exn (** Convert the content having fields referencing element by name into content having fields referencing other contents *) @@ -51,7 +52,19 @@ let rec convert : Model.Reference.v (fun () -> match get_content setting name with | Some v -> v - | None -> raise (BrokenLink (ty, value, name)))) + | None -> + (* Also check from the list catalog *) + begin match + List.find_opt setting.lists ~f:(fun { id; _ } -> + String.equal id name) + with + | Some v -> + ignore v; + raise_notrace + (NotImplemented (ty, value, name)) + | None -> + raise_notrace (BrokenLink (ty, value, name)) + end)) field); } in -- cgit v1.2.3