-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
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
Instructions incomplete/incorrect on how to define an additive group #63
Comments
There is some confusion here: These restrict to what kind of things it can accept, but as a trade make using it cleaner The |
I think I understand, but are you sure that list of required traits is complete? The compiler is complaining, I think it wants me to implement
It seems like there are only three things I'm defining: the "add" operator, the "negate" operator, and the "zero" element, but I still have to manually implement 8 Traits on top of everything that alga_derive derives? Is there really no macro that does the obvious derivations of the 5 redundant traits? |
@jeremysalwen That's correct. We only have macros for implementing the |
If I define an additive group according to the instructions in the documentation, it still will not satisfy the AdditiveGroup trait, and I can't do addition with it (e.g.
element + element
).Gives the error:
See also: https://stackoverflow.com/questions/54303935/defining-additivegroup-with-alga-crate
The text was updated successfully, but these errors were encountered: