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
add ascii to functional #7501
add ascii to functional #7501
Conversation
Thanks for your pull request and interest in making D better, @heavyk! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#7501" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure that this is a phobos bug and should be fixed here, but at the very least this import should go on line 213-214. See also unaryFun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but buggins/dlangide#398 not a phobos issue. String mixin's are evaluated in the scope of the mixin
statement (=> std.functional.binaryFun
) and not in the module where reduce
is instantiated. Use a lambda instead if you need access to local symbols.
One could consider an enhancement request to binaryFun
and frieds which add an import std;
to it's implementation but that has some other problems, e.g. name conflicts for symbols from different modules (std.file.write
vs. std.stdio.write
).
@@ -68,6 +68,7 @@ module std.functional; | |||
|
|||
import std.meta : AliasSeq, Reverse; | |||
import std.traits : isCallable, Parameters; | |||
import std.ascii; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely this can't be the way forward. Why exactly can't this be local?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the other two comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did. Still not 100% sure.
ok, just let me know what you want me to change when it's decided :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should try to get this fix merged instead.
@NilsLankila yes that seems quite appropriate, actually. nevermind then :) |
ran into this when trying to install dlangide
fixes buggins/dlangide#398