elpi icon indicating copy to clipboard operation
elpi copied to clipboard

[wish] Put the "L" in "REPL" by making it loop

Open shonfeder opened this issue 2 years ago • 1 comments

The current behavior of the repl is to read an expression, query the goal, and quit. It would be much nicer if it looped, and allowed posing repeated queries :)

Additionally, I usually use the repl wrapped in rlwrap to make for a slightly nicer experience, but it'd be nice to include some readline functionality with the program. IIUC, this might be accomplished via https://github.com/ocaml-community/ocaml-linenoise?

I'd be happy to help with this kind of effort, if you thought it worth pursuing.

shonfeder avatar Apr 30 '22 00:04 shonfeder

Right the repl can take some love.

Im ok merging code, only two points:

  • I don't want external dependencies which are both non optional and not rock solid
  • I want to keep windows support, even if it can have less features

Example: it was a boodbath to replace campl5 by menhir, but I'm not looking back. External non standard perl dependencies? Strong coupling with the ocaml compiler? I just needed a parser.

You surely know better the records of lineoise library. Looks nice and self contained, but I never used it.

About the L, sure, no problem. Help is always welcome.

gares avatar Apr 30 '22 05:04 gares