In #959, we introduced saturated constructors and a movement for moving to their arguments. (i.e. if C @a0 @a1 x0 x1 x2 is a saturated constructor, represented as Cons "C" [a,b] [x,y,z], then from focusing on the ctor node, one can use ConChild i movement to move to xi (for i=0,1,2), or the EnterConTypeArgument i to move to ai (i=0,1). However, to keep that PR more self-contained, we did not touch the existing Child1, Child2 and Branch movements that move through our mostly-binary AST (with Branch for the non-binary pattern-match nodes). This is now getting somewhat redundant!
Note that EnterConTypeArgument is a temporary abberation, and will be removed in #962 when constructors no longer store indices.
We should revisit the movement code to combine some of these term movements. As @georgefst says in #959 (comment), we probably want to revisit this when we consider how to remove IDs, so this is left as future work. (If we want, I think we could combine these movements before revisiting IDs, but I don't think it is a priority).
In #959, we introduced saturated constructors and a movement for moving to their arguments. (i.e. if
C @a0 @a1 x0 x1 x2is a saturated constructor, represented asCons "C" [a,b] [x,y,z], then from focusing on the ctor node, one can useConChild imovement to move toxi(fori=0,1,2), or theEnterConTypeArgument ito move toai(i=0,1). However, to keep that PR more self-contained, we did not touch the existingChild1,Child2andBranchmovements that move through our mostly-binary AST (withBranchfor the non-binary pattern-match nodes). This is now getting somewhat redundant!Note that
EnterConTypeArgumentis a temporary abberation, and will be removed in #962 when constructors no longer store indices.We should revisit the movement code to combine some of these term movements. As @georgefst says in #959 (comment), we probably want to revisit this when we consider how to remove IDs, so this is left as future work. (If we want, I think we could combine these movements before revisiting IDs, but I don't think it is a priority).