Skip to content

Commit

Permalink
Fix warning 4 in sexp-derived code
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeee committed Aug 25, 2024
1 parent 7e079f1 commit 05c6ea5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/lib/merkle_mask/masking_merkle_tree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ module Make (Inputs : Inputs_intf.S) = struct
*)
}

(* Manual definitions of sexp are needed to avoid warning 4 in autogenerated code *)
type unhashed_accounts_t = Account.t option * Location.t

let sexp_of_unhashed_accounts_t =
Tuple2.sexp_of_t (Option.sexp_of_t Account.sexp_of_t) Location.sexp_of_t

let unhashed_accounts_t_of_sexp =
Tuple2.t_of_sexp (Option.t_of_sexp Account.t_of_sexp) Location.t_of_sexp

type t =
{ uuid : Uuid.Stable.V1.t
; mutable parent : Parent.t
Expand All @@ -93,7 +102,7 @@ module Make (Inputs : Inputs_intf.S) = struct
This is used as a lookup cache. *)
; mutable accumulated : (accumulated_t[@sexp.opaque]) option
; mutable is_committing : bool
; mutable unhashed_accounts : (Account.t option * Location.t) list
; mutable unhashed_accounts : unhashed_accounts_t list
}
[@@deriving sexp]

Expand Down

0 comments on commit 05c6ea5

Please sign in to comment.