-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Problems with operators with "=" in them #1267
Comments
It's just that |
Which defeats the purpose in this case--the point would be to make it usable infix. So this is an extension on |
I can't define the fish operator |
Very possible. The trouble is that |
Can it be picked up when the method body is bound to the name (I assume this happens at some point), or is inspecting the string representation of the symbol not possible at that point? |
That can be done, but then it maybe also has to be disallowed on the left of an assignment? |
Thanks! While we won't be able to implement a subset of Haskell with Julia macros, at least we'll be consistent about it! |
While trying to emulate Haskell syntax for the monad module I'm suddenly working on, I tried to define
>>=
as an alias forbind(f::Function, m::Monad)
. Julia lets me make the definition, but doesn't let me use it:(entire WIP monad.jl: https://gist.github.com/3677645)
I get different errors if I try to simplify things:
Clearly the
=
in>>=
is the source of confusion. Do we want to fix things so>>=
can be legal infix, or ban=
from infix operators?The text was updated successfully, but these errors were encountered: