You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Busy or long-lived REPL sessions would benefit from a command to dump rules that are defined in the REPL environment. All REPL input is evaluated within a module, so the REPL environment is essentially the currently active module.
The simplest option would be a REPL command to "show" the currently active module, for example:
> p :- true
> show
package repl
p :- true
Another, more complex option, would allow the REPL to drop into the user's $EDITOR with an "edit" command. The editor would receive the text representation of the REPL's currently active module. This would be nice because then users could create and update complex rules, on the fly, with their choice of editor. (something which is a bit of a pain today).
The text was updated successfully, but these errors were encountered:
I don't know of any REPLs that will open an editor. If the Repl did open in an editor, I think people would want it to work so that if they hit Save, it would update the REPL. That sounds somewhat complex. If someone wants to edit in an editor and yet use OPA for debugging, a simpler approach would be to make OPA watch for changes to files on disk and reload those files when they change.
Busy or long-lived REPL sessions would benefit from a command to dump rules that are defined in the REPL environment. All REPL input is evaluated within a module, so the REPL environment is essentially the currently active module.
The simplest option would be a REPL command to "show" the currently active module, for example:
Another, more complex option, would allow the REPL to drop into the user's $EDITOR with an "edit" command. The editor would receive the text representation of the REPL's currently active module. This would be nice because then users could create and update complex rules, on the fly, with their choice of editor. (something which is a bit of a pain today).
The text was updated successfully, but these errors were encountered: