Stream: Elpi users & devs

Topic: Elpi REPL


view this post on Zulip Philip Kaludercic (Nov 07 2023 at 12:53):

I am not sure if I am doing something wrong, but is it intended that the elpi executable only takes a single query then quits? I wrapped a portion of the code in a while true do ... done, and it seems to work. If not, then the name REPL would be a misnomer?

view this post on Zulip Enrico Tassi (Nov 07 2023 at 13:24):

Can you be more specific?
I believe elpi a.elpi loads a and then asks for a goal, then shows an answer and asks you if you want more.

view this post on Zulip Philip Kaludercic (Nov 07 2023 at 14:29):

Enrico Tassi said:

Can you be more specific?
I believe elpi a.elpi loads a and then asks for a goal, then shows an answer and asks you if you want more.

Most Prolog top levels I know wouldn't terminate after answering a query, but prompt the user for the next one. That is what I understand the "Loop" to mean in "Read Eval Print Loop". If you are interested, I could provide a patch that would implement this, at least as an optional feature. I am working on an Emacs mode for Elpi, and having this behaviour would make a lot of sense in that context.

view this post on Zulip Enrico Tassi (Nov 07 2023 at 14:30):

Oh, I see. fine by me, patches are welcome. But beware the ML API is not tailored for that.

view this post on Zulip Philip Kaludercic (Nov 07 2023 at 14:32):

Great, I'll try and see if I'll get something sensible working, considering the broken state of my Ocaml installation ^^.


Last updated: Oct 13 2024 at 01:02 UTC