-
Notifications
You must be signed in to change notification settings - Fork 65
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
Allow more inputs for gens(::UniversalPolyRing, ...)
#1809
base: master
Are you sure you want to change the base?
Conversation
cdba564
to
4d9f040
Compare
This seems to be breaking, as it changes the return value of |
c02fae0
to
6150007
Compare
What changes about the return value of In general it strikes me as being more consistent with what we do everywhere else: Perhaps a better API going forward would be this: function (a::UniversalPolyRing)(b::VarName)
return gen(a, b)
end
function (a::UniversalPolyRing)(b1::VarName, b2::VarName, bN::VarName...)
return Tuple(gens(a, [b1, b2, bN...]))
end Then one can write
And here |
However, we should also be a bit wary about breaking existing code. E.g. this would break the |
No, the problem is that |
This PR seems to do more than it says in the title: besides trying to tweak |
I've asked @SoongNoonien to look into applying One idea might be to use a trick similar to what I did in Oscar for |
I've resurrected the first commit of this PR, resolved conflicts and put it into #1985.
I don't think resurrecting this is worth the effort as one would first need to think how to make the approach here compatible with #1983. But feel free to take inspiration from this PR, if needed. And maybe you end up with something that covers this case here as well. |
using
@varnames_interface
with a small workaround.Due to weirdness with this macro between modules and inclusion order, I distributed the macro calls to respective files.