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

Split the variable dump and stdout in Prolog format toplevel #20

Open
guregu opened this issue Oct 8, 2022 · 0 comments
Open

Split the variable dump and stdout in Prolog format toplevel #20

guregu opened this issue Oct 8, 2022 · 0 comments
Milestone

Comments

@guregu
Copy link
Owner

guregu commented Oct 8, 2022

Currently the "prolog" format toplevel just returns a string. If you write to stdout, this gets mixed with the actual variable dump / residual goals output of the toplevel.

Maybe it should return an object like this instead:

{answer: "X=1.", stdout: "hello world", stderr: "Warning: ..."}

It's possible to capture this output like the JSON format, but it introduces a spurious choice point. Some hacking of the toplevel code in Trealla could spit out some separators for us. I don't want to mess with it too much as I would like to upstream my fork eventually. Maybe a CLI flag.

@guregu guregu added this to the v2 milestone Oct 8, 2022
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

No branches or pull requests

1 participant