From 62e4641e2efd7f415e93adc4225164b9c116de8d Mon Sep 17 00:00:00 2001 From: zach Date: Wed, 10 Aug 2022 12:41:37 -0700 Subject: [PATCH] Split out create_error and write_error --- src/irmin-pack/unix/pack_index_intf.ml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/irmin-pack/unix/pack_index_intf.ml b/src/irmin-pack/unix/pack_index_intf.ml index e3277a7f14..c505caf21e 100644 --- a/src/irmin-pack/unix/pack_index_intf.ml +++ b/src/irmin-pack/unix/pack_index_intf.ml @@ -36,7 +36,10 @@ module type S = sig string -> t - type error := + type create_error := + [ `Index_failure of string | `Io_misc of Io.Unix.misc_error ] + + type write_error := [ `Index_failure of string | `Io_misc of Io.Unix.misc_error | `Ro_not_allowed ] @@ -49,12 +52,12 @@ module type S = sig ?lru_size:int -> log_size:int -> string -> - (t, [> error ]) result + (t, [> create_error ]) result - val reload : t -> (unit, [> error ]) result - val close : t -> (unit, [> error ]) result + val reload : t -> (unit, [> write_error ]) result + val close : t -> (unit, [> write_error ]) result val close_exn : t -> unit - val flush : t -> with_fsync:bool -> (unit, [> error ]) result + val flush : t -> with_fsync:bool -> (unit, [> write_error ]) result val find : t -> key -> value option val add : ?overcommit:bool -> t -> key -> value -> unit val merge : t -> unit