Skip to content

Commit c484610

Browse files
Compiler: Build_info/Unit_info: conversion to and from string maps (#1657)
Co-authored-by: Jérôme Vouillon <[email protected]>
1 parent 3204c33 commit c484610

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

compiler/lib/build_info.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ let parse s =
9090
in
9191
Some t
9292

93+
let to_map : t -> string StringMap.t = Fun.id
94+
95+
let of_map : string StringMap.t -> t = Fun.id
96+
9397
exception
9498
Incompatible_build_info of
9599
{ key : string

compiler/lib/build_info.mli

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ val to_string : t -> string
3434

3535
val parse : string -> t option
3636

37+
val to_map : t -> string StringMap.t
38+
39+
val of_map : string StringMap.t -> t
40+
3741
val with_kind : t -> kind -> t
3842

3943
exception

0 commit comments

Comments
 (0)