egraphs-good / egglog

egraphs + datalog!
https://egraphs-good.github.io/egglog/
MIT License
400 stars 45 forks source link

Adding span annotations to the internal representation #389

Closed yihozhang closed 1 month ago

yihozhang commented 2 months ago

What this PR does:

What this PR does not do:

saulshanabrook commented 1 month ago

So just to be clear, the goal for the PR after this is to not only have row/column for parsing but also when there is say an error running a rule or something? Or which types of errors do we hope to attach source information too?

yihozhang commented 1 month ago

@saulshanabrook Since the ASTs are annotated, technically we should be able to locate the source program location for every (runtime/compile time) error. This PR leaves this problem open though, since it has not got to the actual error reporting part, but I think what you described is the goal.

yihozhang commented 1 month ago

@ezrosent @oflatt Thanks for the feedback! I have got rid of the Ann type parameter.