package hardcaml_waveterm
Source file wave_format.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22open Base open Hardcaml type t = | Binary | Bit | Bit_or of t | Hex | Unsigned_int | Int | Index of string list | Custom of (Bits.t -> string) [@@deriving sexp_of] let rec equal a b = match a, b with | Binary, Binary | Bit, Bit | Hex, Hex | Int, Int | Unsigned_int, Unsigned_int -> true | Bit_or a, Bit_or b -> equal a b | Index a, Index b -> [%compare.equal: string list] a b | Custom f, Custom g -> phys_equal f g | (Bit | Bit_or _ | Binary | Hex | Unsigned_int | Int | Index _ | Custom _), _ -> false ;;