-
Notifications
You must be signed in to change notification settings - Fork 11
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
section syntax? #222
Comments
Hackett supports infix syntax as |
The same issue prevents a user-defined the user from defining a user-defined macro |
Some other languages support the syntax Maybe we could introduce a limited version of that syntax which is only meant for sections, and thus the lambda is always introduced at the innermost parens? So |
Or, since we're not yet using curly parens for anything, the lambda could be bound at the closest enclosing curlies? So |
The final option there would be a nice little macro to define :) I think Haskell-style sections don't fit well into a language with Lispy syntax and auto-currying, though - it's too much of a special case. |
I recently encountered a bug in which I had written:
to mean
But in Klister,
(< 10)
means(lambda (x) (< 10 x))
, not(lambda (x) (< x 10))
. I made that mistake because(< 10)
means the latter in Haskell, but the former in Klister. Since target audience is Haskellers, I think our users are likely to make that mistake very often. Is there something we could do to make it less common?The text was updated successfully, but these errors were encountered: