-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
atom option in gen/common/edge.ml is currently used to represent the "plain annotation" P. I personally find there's room for improvement, for a couple of reasons:
- One would expect the value
None : atom optionto represent "absence of annotation", or a failure state, but it doesn't. This is particularly counter-intuitive (IMO) when looking at the signature of functions likeparse_atom : string -> atom optionand incorrectly expectingatom optionto represent "failure to parse". - The semantics of
Pitself makes it more similar to a wildcard.Pmakes the annotated access plain by default, but does not enforce this property. Indeed, mergingPwith any non-Patomaequalsa, soPreally stands for "plain unless specified otherwise". I think it would be useful to also be able to express scenarios where adiyedge endpoint must be plain, and not just "plain unless specified otherwise".
To address both issues, I propose we:
- extend
atomwith a constructor to represent thePannotation, removing the need foratom option.P's behaviour as a "wildcard"/"default annotation" can be preserved by modifying the edge/atom merging functions accordingly. This will also makeatommore in like withsd,ie, etc., all of which also define their own wildcard constructors. - further extend
atomwith a completely new constructor to represent accesses that must be plain.
The can (and probably, should) address these two points in two separate PRs.
See original discussion here. CC @ShaleXIONG
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels