We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eq
equal
Example:
type t = < foo : int > [@@deriving eq]
Expected behavior: An equality function for t is generated, i.e. something like:
t
let equal : t -> t -> bool = fun a b -> Int.equal a#foo b#foo
Actual behavior: The ppx gives the following error:
eq cannot be derived for < foo : int >
I use anonymous objects like these to simulate similar behavior with anonymous records in standard variants, i.e.
type variant = | Foo of { bar : int } type poly = [ `Foo of < bar : int > ]
Is there a reason I can't think of that deriving equality functions for objects is non-trivial compared to records?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example:
Expected behavior: An equality function for
t
is generated, i.e. something like:Actual behavior: The ppx gives the following error:
I use anonymous objects like these to simulate similar behavior with anonymous records in standard variants, i.e.
Is there a reason I can't think of that deriving equality functions for objects is non-trivial compared to records?
The text was updated successfully, but these errors were encountered: