summaryrefslogtreecommitdiff
path: root/src/Identifiers.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Identifiers.ml11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Identifiers.ml b/src/Identifiers.ml
index 27ed2921..1b9e114c 100644
--- a/src/Identifiers.ml
+++ b/src/Identifiers.ml
@@ -19,6 +19,8 @@ module type Id = sig
val id_of_yojson : Yojson.Safe.t -> (id, string) Result.result
+ val id_of_json : Yojson.Safe.t -> (id, string) Result.result
+
val id_to_yojson : id -> Yojson.Safe.t
val vector_of_yojson :
@@ -26,6 +28,11 @@ module type Id = sig
Yojson.Safe.t ->
('a vector, string) Result.result
+ val vector_of_json :
+ (Yojson.Safe.t -> ('a, string) Result.result) ->
+ Yojson.Safe.t ->
+ ('a vector, string) Result.result
+
val vector_to_yojson : ('a -> Yojson.Safe.t) -> 'a vector -> Yojson.Safe.t
(* TODO: remove *)
@@ -52,6 +59,10 @@ module IdGen () : Id = struct
let to_string = string_of_int
+ let id_of_json = id_of_yojson
+
+ let vector_of_json = vector_of_yojson
+
(* TODO: how to make this work? *)
(* (module Ord : Map.OrderedType = struct
type t = id