Closed jacobdweightman closed 2 years ago
After reading the effects/handlers design document, I have a couple questions about the intended syntax for effect handlers:
Is the <effect-ctor-ref>
component of an effect implication intended to be an effect constructor reference in the way that the parser defines it? Specifically, the parser defines an effect-ctor-ref as:
<effect-ctor-ref> := "do" <identifier>
<effect-ctor-ref> := "do" <identifier" "(" <comma-separated-arguments> ")"
I'm essentially wondering if you want to have the "do" as part of the left-hand side of the effect implication.
Are handlers required to come after implications in a predicate definition, or should it be possible for implications and handlers to be interleaved?
do
as part of the effect implication. I think that will make the parser change a little bit easier (or at least a little bit smaller).Sounds good to me. I like those answers because they make the implementation of this issue a lot easier 😄
This issue is related to the effects and handlers design document.
Implement parsing for handlers.
handle
should be supported by the lexer.--print-syntactic-ast