Skip to content

Commit

Permalink
Use Yojson.Safe.t list as placeholder type for storage_transformers.
Browse files Browse the repository at this point in the history
Since the storage_transformer metadata is not yet supported, we use
a trivial `Yojson.Safe.t list` instead of a phantom specialized type.
  • Loading branch information
zoj613 committed Sep 13, 2024
1 parent 54a6aa5 commit 9f96f21
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion zarr/src/metadata.ml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module ArrayMetadata = struct
;chunk_key_encoding : ChunkKeyEncoding.t
;attributes : Yojson.Safe.t
;dimension_names : string option list
;storage_transformers : Yojson.Safe.t Util.ExtPoint.t list}
;storage_transformers : Yojson.Safe.t list}

let create
?(sep=`Slash)
Expand Down
10 changes: 0 additions & 10 deletions zarr/src/util.ml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
module ExtPoint = struct
type 'a t =
{name : string
;configuration : 'a}

let ( = ) cmp x y =
(x.name = y.name) &&
cmp x.configuration y.configuration
end

module ArrayMap = struct
include Map.Make (struct
type t = int array
Expand Down
7 changes: 0 additions & 7 deletions zarr/src/util.mli
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
module ExtPoint : sig
(** The type representing a JSON extension point metadata configuration. *)

type 'a t = {name : string ; configuration : 'a}
val ( = ) : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
end

(** A finite map over integer array keys. *)
module ArrayMap : sig
include Map.S with type key = int array
Expand Down

0 comments on commit 9f96f21

Please sign in to comment.