andrenth / ocaml-stdint

Various signed and unsigned integers for OCaml
Other
85 stars 16 forks source link

Cannot derive `eq` and `show` #72

Open hirrolot opened 1 year ago

hirrolot commented 1 year ago

I currently have the following data type:

open Stdint

type fixed_int =
  | U8 of Uint8.t
  | U16 of Uint16.t
  | U32 of Uint32.t
  | U64 of Uint64.t
[@@deriving eq, show]

@@deriving panics because there is no equal and show methods for those integer types. I expect the above code to just compile.