-
Notifications
You must be signed in to change notification settings - Fork 2
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
51 get examples of custom rules #236
Conversation
- pattern: | | ||
FunctionMt. Function ::= "$mt" "(" <prefix :: (Expression)> "," <suffix :: (Expression)> ")" | ||
description: | | ||
Return the string "<prefix>.<suffix>". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we should work with strings. We should work with AST. <prefix>
should be a valid <suffix>
should be a valid attribute (or chain of dispatch/application).
Also naming is not explained. Why mt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also, why do we need $mt
if we can simply use dot .
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we should work with strings.
Yes, it should be a dispatch.
Also naming is not explained. Why mt?
IDK. It comes from use cases. I'd prefer $dot.
And also, why do we need $mt if we can simply use dot?
I believe we shouldn't use dot with functions, should we? Which option looks better?
a.$name(b)
$dot(a, $name(b))
- pattern: | | ||
FunctionName. Function ::= "$name" "(" <binding :: (MetaId)> ")" | ||
description: | | ||
Return the name of <binding>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need it if we have ?a
for the name already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may not have the name in case of \?A ?a..b -> c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we can use $name to extract all names from a list of bindings.
We may need to do that when we need to check that a name of some binding doesn't belong to that list.
94e598b
to
d430007
Compare
- improve types in spec - add examples in spec
d430007
to
dbdf23b
Compare
Closes #51
Links:
PR-Codex overview
This PR enhances the specifications.yaml file by defining MetaBinding patterns and functions for manipulating bindings.
Detailed summary