egraphs-good / egglog

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

Adding span annotations to the internal representation #389

Closed yihozhang closed 3 months ago

yihozhang commented 4 months ago

What this PR does:

What this PR does not do:

saulshanabrook commented 4 months 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 4 months 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 4 months ago

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