Skip to content

Commit

Permalink
Adjusted signature of equal_local_date_time_result
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Nov 28, 2023
1 parent b5c78d1 commit e950d3d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion timedesc-sexp/of_sexp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ let date_time_of_sexp (x : Sexp.t) =
with
| Ok x ->
if
T.equal_local_date_time_result ~eq:T.Span.equal offset_from_utc
T.equal_local_date_time_result T.Span.equal offset_from_utc
T.(offset_from_utc x)
then x
else invalid_data ()
Expand Down
4 changes: 2 additions & 2 deletions timedesc/date_time.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type 'a local_date_time_result =
| `Ambiguous of 'a * 'a
]

let equal_local_date_time_result ~eq (x : 'a local_date_time_result) (y : 'a local_date_time_result) =
let equal_local_date_time_result eq (x : 'a local_date_time_result) (y : 'a local_date_time_result) =
match (x, y) with
| `Single x, `Single y -> eq x y
| `Ambiguous (x1, x2), `Ambiguous (y1, y2) -> eq x1 y1 && eq x2 y2
Expand Down Expand Up @@ -123,7 +123,7 @@ let equal (x : t) (y : t) =
Date.equal x.date y.date
&& Time.equal x.time y.time
&& Time_zone.equal x.tz y.tz
&& equal_local_date_time_result ~eq:Span.equal x.offset_from_utc y.offset_from_utc
&& equal_local_date_time_result Span.equal x.offset_from_utc y.offset_from_utc

let now ?tz_of_date_time () : t =
timestamp_now ()
Expand Down
2 changes: 1 addition & 1 deletion timedesc/timedesc.mli
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ val max_of_local_date_time_result : 'a local_date_time_result -> 'a
*)

val equal_local_date_time_result :
eq:('a -> 'a -> bool) -> 'a local_date_time_result -> 'a local_date_time_result -> bool
('a -> 'a -> bool) -> 'a local_date_time_result -> 'a local_date_time_result -> bool

(** {1 Span} *)

Expand Down

0 comments on commit e950d3d

Please sign in to comment.