Skip to content

Commit faae69d

Browse files
committed
Document use of unreachable_code
1 parent ef8d431 commit faae69d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/mina_block/legacy_format.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ module User_command = struct
4141

4242
let to_yojson : t -> Yojson.Safe.t = function
4343
| User_command.Poly.Signed_command _ as tx ->
44+
(* ~proof_to_yojson is unused when Helper.to_yojson is applied to a
45+
Signed_command; the unreachable_code function (which takes a
46+
value of the uninhabited Nothing.t type) is a compile-time proof
47+
of this fact through the type system. *)
4448
Helper.to_yojson ~proof_to_yojson:Nothing.unreachable_code tx
4549
| User_command.Poly.Zkapp_command { fee_payer; memo; account_updates }
4650
->

0 commit comments

Comments
 (0)