Skip to content

Commit

Permalink
Document non-trivial function Code.constant_equal
Browse files Browse the repository at this point in the history
Co-authored-by: Jérome Vouillon <[email protected]>
  • Loading branch information
OlivierNicole and vouillon committed Jul 31, 2024
1 parent 3204c33 commit 3ed6c34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/lib/code.mli
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ type constant =
| Tuple of int * constant array * array_or_not
| Int of int32

(** Guaranteed equality in terms of both OCaml [(=)] and Javascript [(==)]: if
[constant_equal a b = Some v], then [Poly.(=) a b = v] and
[Js_of_ocaml.Js.equals a b = v]. This is used for optimization purposes. *)
val constant_equal : constant -> constant -> bool option

type loc =
Expand Down

0 comments on commit 3ed6c34

Please sign in to comment.