Skip to content
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

feat: make errors spanned in computations #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

SolarLiner
Copy link
Collaborator

No description provided.

body: Box::new(body),
})
Sym::Lambda(prog) => non_linear_check(
prog.iter().map(|s| &s.value).positioned(
Copy link
Member

Choose a reason for hiding this comment

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

I think we should avoid such "on the fly" computation of default positions and provide another representation of programs that includes position information instead @SolarLiner

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean baking positions into ComputationTree? I don't think it is necessary to duplicate data structures here; otherwise yes, keeping positions around would be best.

Copy link
Member

Choose a reason for hiding this comment

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

Yup. In that case let's just add a field for the positions in the ComputationTree

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can use the Spanned wrapper type that has all the goodies to make manipulating positions and values easier within it

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