ocamlformat

This commit is contained in:
Simon Cruanes 2024-12-13 00:17:53 -05:00
parent b140a50c46
commit cad41d70d6
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
26 changed files with 89 additions and 92 deletions

View file

@ -68,7 +68,7 @@ jobs:
strategy: strategy:
matrix: matrix:
ocaml-compiler: ocaml-compiler:
- '5.1' - '5.2'
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: actions/checkout@main - uses: actions/checkout@main
@ -79,6 +79,6 @@ jobs:
dune-cache: true dune-cache: true
allow-prerelease-opam: true allow-prerelease-opam: true
- run: opam install ocamlformat.0.24.1 - run: opam install ocamlformat.0.26.2
- run: opam exec -- make format-check - run: opam exec -- make format-check

View file

@ -1,4 +1,4 @@
version = 0.24.1 version = 0.26.2
profile=conventional profile=conventional
margin=80 margin=80
if-then-else=k-r if-then-else=k-r

View file

@ -66,8 +66,7 @@ let rec cut_depth n t () =
(** {2 Graph Traversals} *) (** {2 Graph Traversals} *)
(** Abstract Set structure *) (** Abstract Set structure *)
class type ['a] pset = class type ['a] pset = object
object
method add : 'a -> 'a pset method add : 'a -> 'a pset
method mem : 'a -> bool method mem : 'a -> bool
end end

View file

@ -49,8 +49,7 @@ val cut_depth : int -> 'a t -> 'a t
(** {2 Graph Traversals} *) (** {2 Graph Traversals} *)
(** Abstract Set structure *) (** Abstract Set structure *)
class type ['a] pset = class type ['a] pset = object
object
method add : 'a -> 'a pset method add : 'a -> 'a pset
method mem : 'a -> bool method mem : 'a -> bool
end end

View file

@ -40,6 +40,5 @@ val ( == ) : [ `Consider_using_CCEqual_physical ]
[@@ocaml.deprecated "Please use CCEqual.physical or Stdlib.(==) instead."] [@@ocaml.deprecated "Please use CCEqual.physical or Stdlib.(==) instead."]
val ( != ) : [ `Consider_using_CCEqual_physical ] val ( != ) : [ `Consider_using_CCEqual_physical ]
[@@ocaml.deprecated [@@ocaml.deprecated "Please use [not CCEqual.physical] or Stdlib.(!=) instead."]
"Please use [not CCEqual.physical] or Stdlib.(!=) instead."]
(** @since 2.1 *) (** @since 2.1 *)

View file

@ -183,7 +183,8 @@ let arb_csexp_arb =
let genstr = Q.Gen.(string_size ~gen:genchar (0 -- 15)) in let genstr = Q.Gen.(string_size ~gen:genchar (0 -- 15)) in
Q.make ~print:Sexp0.to_string ~shrink:shrink_csexp (gen_csexp genstr) Q.make ~print:Sexp0.to_string ~shrink:shrink_csexp (gen_csexp genstr)
module Make (X : sig module Make
(X : sig
val arb : Csexp.t Q.arbitrary val arb : Csexp.t Q.arbitrary
end) end)
() = () =

View file

@ -108,8 +108,7 @@ let t1 = H.of_list [ 1, "a"; 2, "b1" ] in
let t2 = H.of_list [ 2, "b2"; 3, "c" ] in let t2 = H.of_list [ 2, "b2"; 3, "c" ] in
let t = let t =
H.merge H.merge
~f: ~f:(fun _ -> function
(fun _ -> function
| `Right v2 -> Some v2 | `Right v2 -> Some v2
| `Left v1 -> Some v1 | `Left v1 -> Some v1
| `Both (s1, s2) -> | `Both (s1, s2) ->