aboutsummaryrefslogtreecommitdiff
path: root/lib/configuration/importConf.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2025-03-13 20:17:51 +0100
committerSébastien Dailly <sebastien@dailly.me>2025-04-08 18:39:49 +0200
commit9e2dbe43abe97c4e60b158e5fa52172468a2afb8 (patch)
treef58276e500d8ab0b84cdf74cc36fc73d4bca3892 /lib/configuration/importConf.mli
parent0bdc640331b903532fb345930e7078752ba54a2d (diff)
Declare the files to load from an external configuration file
Diffstat (limited to 'lib/configuration/importConf.mli')
-rw-r--r--lib/configuration/importConf.mli10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/configuration/importConf.mli b/lib/configuration/importConf.mli
index d2f65f2..7234499 100644
--- a/lib/configuration/importConf.mli
+++ b/lib/configuration/importConf.mli
@@ -1,4 +1,12 @@
-val t_of_toml : Otoml.t -> (ImporterSyntax.t, string) result
+type loader_context = {
+ checkFile : string -> bool;
+ loadFile : string -> Otoml.t;
+}
+
+val t_of_toml :
+ context:loader_context -> Otoml.t -> (ImporterSyntax.t, string) result
+(** [fileChecker] is called when a file is declared in the configuration. An
+ arror will be raised if the computation return false *)
val expression_from_string :
string -> (ImportDataTypes.Path.t ImportExpression.T.t, string) result