You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now coconut's operator functions are restricted to single-word operators.(is) and (+) work as expected, but (is not) and (not in) are CoconutParseErrors. This is currently not explicitly stated, the multi-word operators are simply missing from the list of available operator functions, making it easy to gloss over the list of operator.<something> that come from python, and concentrating only on the new coconut operators.
So if this restriction isn't easy to lift, I'd like to suggest adding a warning about it to the docs and refer to the example from the addpattern-decorator-section, that uses a function composition (. is None) ..> (not).
This came about when I tried using them in pattern matching with implicit partial application of the form (. <op> <arg>). Here I have seen an additional gotcha: while (is not) is an invalid operator function, (. is not None)is valid and is compiled like (. is (not None)).
The text was updated successfully, but these errors were encountered:
Right now coconut's operator functions are restricted to single-word operators.
(is)
and(+)
work as expected, but(is not)
and(not in)
areCoconutParseError
s. This is currently not explicitly stated, the multi-word operators are simply missing from the list of available operator functions, making it easy to gloss over the list ofoperator.<something>
that come from python, and concentrating only on the new coconut operators.So if this restriction isn't easy to lift, I'd like to suggest adding a warning about it to the docs and refer to the example from the addpattern-decorator-section, that uses a function composition
(. is None) ..> (not)
.This came about when I tried using them in pattern matching with implicit partial application of the form
(. <op> <arg>)
. Here I have seen an additional gotcha: while(is not)
is an invalid operator function,(. is not None)
is valid and is compiled like(. is (not None))
.The text was updated successfully, but these errors were encountered: