From 1d7a16962419c4ed95e2de9f86ac308b784ce118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Tue, 11 Jun 2024 16:02:56 +0200 Subject: [PATCH] Build_info/Unit_info: support for sexp serialization --- compiler/lib/build_info.ml | 4 ++++ compiler/lib/build_info.mli | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/compiler/lib/build_info.ml b/compiler/lib/build_info.ml index 66b0e4b442..9802c9eb81 100644 --- a/compiler/lib/build_info.ml +++ b/compiler/lib/build_info.ml @@ -90,6 +90,10 @@ let parse s = in Some t +let to_map : t -> string StringMap.t = Fun.id + +let of_map : string StringMap.t -> t = Fun.id + exception Incompatible_build_info of { key : string diff --git a/compiler/lib/build_info.mli b/compiler/lib/build_info.mli index 9bb1254a78..f80eee1646 100644 --- a/compiler/lib/build_info.mli +++ b/compiler/lib/build_info.mli @@ -34,6 +34,10 @@ val to_string : t -> string val parse : string -> t option +val to_map : t -> string StringMap.t + +val of_map : string StringMap.t -> t + val with_kind : t -> kind -> t exception