egraphs-good / egglog

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

`parse_and_run_program` doesn't return a log when it errors #332

Open Alex-Fischman opened 10 months ago

Alex-Fischman commented 10 months ago

I have a program with the following strucutre:

; ...
(extract var1)
(check (= var1 (...))))

I should be able to get the extracted expression whether the check succeeds or not. However, because parse_and_run_program returns a Result<Vec<String>, Error>, I can't. Instead, it should return something like (Vec<String>, Option<Error>), because not all errors invalidate the log.