-
Notifications
You must be signed in to change notification settings - Fork 22
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
Adding a clause for an operator does not work #185
Comments
@david-christiansen Could you help me here please? If I just send In emacs everything works as expected, but I can't imagine that the emacs mode strips unrequired parantheses from the response. |
…ckets unwrap the word again when we get the response. This fixes idris-hackers#185
@david-christiansen I tried my outlined approach with this PR and it seems to work, but I really would like to have other developers opinion on this. It feels weird. |
I wonder why this isn't working... the Emacs mode doesn't do it this way. Here's a bit of a log from an add-clause command in the Emacs mode:
I then issue add-clause with the cursor on the operator, and Emacs sends this:
Idris replies with this:
Your example works fine too:
So I'm not sure why it would need that. Can you post a log of the message being sent? |
Your
So from what I gather the difference is that emacs quotes the ":|:" (which seems correct) and atom doesn't. So my fix is futile, and it would be sufficient to quote the word. |
Yes, names should always be passed as strings.
…On Fri, Sep 7, 2018, 09:58 Markus Klink ***@***.***> wrote:
Your ++++ example works without my PR.
the :|: example works like this:
000018((:add-clause 4 :|:) 6)
(:return (:error "did not understand") 6)
So from what I gather the difference is that emacs quotes the ":|:" (which
seems correct) and atom doesn't. So my fix is futile, and it would be
sufficient to quote the word.
Thank you very much!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHCggvj6bIo35SBYIUe36d3l9ZhL5NXks5uYqWugaJpZM4O8T-o>
.
|
The underlying bug is in the sexp-formatter which always treats strings starting with : as symbol. This breaks clauses like ":|:" since they are not being quoted This fixes idris-hackers#185
Given
and trying to add a clause with the cursor inside the brackets results in
The text was updated successfully, but these errors were encountered: