Skip to content

Add pure and access fragment functions for expressions#908

Open
jackstodart wants to merge 1 commit intoviperproject:masterfrom
jackstodart:master
Open

Add pure and access fragment functions for expressions#908
jackstodart wants to merge 1 commit intoviperproject:masterfrom
jackstodart:master

Conversation

@jackstodart
Copy link
Copy Markdown

Adds a function to split expressions into their pure/functional fragment and their access component. Includes convenience function to split predicate bodies in pure and access fragments.

(rec(left), rec(right)) match {
case (Some(left2), Some(right2)) => Some(And(left2, right2)(and.pos, and.info, and.errT))
case (Some(left2), None) => Some(left2)
case (None, Some(right2)) => Some(right2)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this case is tricky. What if I have i in bounds && acc(s[i].f), then I need to know the first part for the second part to be well-defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants