-
-
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
Left multiplication for vector spaces #24
Comments
I was going to say how orphan rules makes it impossible, but then I realised you can actually require the Not sure if it generalises to the actual |
Looks like that is not enough for the example above. The compiler does not interpret the where clause as an implication, forcing you to explicitly add it again. To reduce it a bit further, this does not work. I have a hunch that fixing it would be a huge problem for the type system or something. |
nice ppl on IRC pointed me to these issues: |
I would argue that before this implication works, it is hardly useful to users to change this. Type authors would have to provide the implementation on the ring or field right away and everybody would have to write down the trait bound no matter whether it is used or not. So perhaps this should be deferred to a time, when implied bounds stabilize. |
This code example fails:
with this error:
(omitted source location in my project for clarity)
Is there a reason, why this can't be made work? As multiplication on the field commutes anyway, the operator should generally be available in this way.
The text was updated successfully, but these errors were encountered: