Skip to content

Commit 15f3f2c

Browse files
committed
Bump ocamlformat to 0.29.0 and reformat
1 parent f3d71b8 commit 15f3f2c

9 files changed

Lines changed: 218 additions & 217 deletions

File tree

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 0.28.1
1+
version = 0.29.0
22
profile = conventional
33

44
ocaml-version = 4.08.0

bench/irmin-pack/trace_common.ml

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -33,68 +33,68 @@
3333
{3 Example}
3434
3535
{[
36-
module Example = struct
37-
module V2 = struct
38-
let version = 2
39-
40-
type header = unit [@@deriving repr]
41-
type row = [ `A | `B | `C ] [@@deriving repr]
42-
end
43-
44-
module V1 = struct
45-
let version = 1
46-
47-
type header = unit [@@deriving repr]
48-
type row = [ `A | `B ] [@@deriving repr]
49-
50-
let to_v2 x = (x :> V2.row)
51-
end
52-
53-
module V0 = struct
54-
let version = 0
55-
56-
type header = unit [@@deriving repr]
57-
type row = [ `A of int | `B of int ] [@@deriving repr]
58-
59-
let to_v1 = function `A _ -> `A | `B _ -> `B
60-
end
61-
62-
module Latest = V2
63-
include Latest
64-
65-
include Trace_common.Io (struct
66-
module Latest = Latest
67-
68-
let magic = Trace_common.Magic.of_string "Magique_"
69-
70-
let get_version_converter = function
71-
| 2 ->
72-
Trace_common.Version_converter
73-
{
74-
header_t = V2.header_t;
75-
row_t = V2.row_t;
76-
upgrade_header = Fun.id;
77-
upgrade_row = Fun.id;
78-
}
79-
| 1 ->
80-
Version_converter
81-
{
82-
header_t = V1.header_t;
83-
row_t = V1.row_t;
84-
upgrade_header = Fun.id;
85-
upgrade_row = V1.to_v2;
86-
}
87-
| 0 ->
88-
Version_converter
89-
{
90-
header_t = V0.header_t;
91-
row_t = V0.row_t;
92-
upgrade_header = Fun.id;
93-
upgrade_row = (fun x -> V0.to_v1 x |> V1.to_v2);
94-
}
95-
| i -> Fmt.invalid_arg "Unknown Example version %d" i
96-
end)
36+
module Example = struct
37+
module V2 = struct
38+
let version = 2
39+
40+
type header = unit [@@deriving repr]
41+
type row = [ `A | `B | `C ] [@@deriving repr]
42+
end
43+
44+
module V1 = struct
45+
let version = 1
46+
47+
type header = unit [@@deriving repr]
48+
type row = [ `A | `B ] [@@deriving repr]
49+
50+
let to_v2 x = (x :> V2.row)
9751
end
52+
53+
module V0 = struct
54+
let version = 0
55+
56+
type header = unit [@@deriving repr]
57+
type row = [ `A of int | `B of int ] [@@deriving repr]
58+
59+
let to_v1 = function `A _ -> `A | `B _ -> `B
60+
end
61+
62+
module Latest = V2
63+
include Latest
64+
65+
include Trace_common.Io (struct
66+
module Latest = Latest
67+
68+
let magic = Trace_common.Magic.of_string "Magique_"
69+
70+
let get_version_converter = function
71+
| 2 ->
72+
Trace_common.Version_converter
73+
{
74+
header_t = V2.header_t;
75+
row_t = V2.row_t;
76+
upgrade_header = Fun.id;
77+
upgrade_row = Fun.id;
78+
}
79+
| 1 ->
80+
Version_converter
81+
{
82+
header_t = V1.header_t;
83+
row_t = V1.row_t;
84+
upgrade_header = Fun.id;
85+
upgrade_row = V1.to_v2;
86+
}
87+
| 0 ->
88+
Version_converter
89+
{
90+
header_t = V0.header_t;
91+
row_t = V0.row_t;
92+
upgrade_header = Fun.id;
93+
upgrade_row = (fun x -> V0.to_v1 x |> V1.to_v2);
94+
}
95+
| i -> Fmt.invalid_arg "Unknown Example version %d" i
96+
end)
97+
end
9898
]} *)
9999

100100
module Seq = struct

src/irmin-cli/cli.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,7 @@ let graphql ~env =
736736
(S)
737737
(struct
738738
let remote = remote_fn
739-
end)
740-
in
739+
end) in
741740
let t = store () in
742741
let server = Server.v (S.repo t) in
743742
let ctx =

src/irmin-git/commit.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ module Make (G : Git.S) = struct
6767
Git.User.{ name; email; date = (date, None) }
6868
in
6969
let message = Info.message info in
70-
G.Value.Commit.make (* FIXME: should be v *)
71-
~tree ~parents ~author ~committer:author
70+
G.Value.Commit.make (* FIXME: should be v *) ~tree ~parents ~author
71+
~committer:author
7272
(if message = "" then None else Some message)
7373

7474
let v ~info ~node ~parents = to_git info node parents

src/irmin/hash_intf.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ module type S = sig
4747
contained in [t] at offset [off]. It has behaviour equivalent to:
4848
4949
{[
50-
Bigstringaf.substring t ~off ~len:hash_size
51-
|> unsafe_of_raw_string
52-
|> short_hash
50+
Bigstringaf.substring t ~off ~len:hash_size
51+
|> unsafe_of_raw_string
52+
|> short_hash
5353
]}
5454
5555
but may be more efficient due to not needing to allocate an intermediate

0 commit comments

Comments
 (0)