Skip to content

Combine Child{1,2} and ConChild Movements #974

@brprice

Description

@brprice

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).

Metadata

Metadata

Assignees

Labels

cleanupSomething that needs cleaning upcoreCore issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions