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

HOL Terminal Basic Issues, Syntax and Related Commands #70

Open
jjoneslivingstone opened this issue Sep 30, 2022 · 4 comments
Open

HOL Terminal Basic Issues, Syntax and Related Commands #70

jjoneslivingstone opened this issue Sep 30, 2022 · 4 comments

Comments

@jjoneslivingstone
Copy link

How do I get out of this without necessarily have to open a new OCaml prompt and reload HOL libs?

ARITH_RULE `(a + x + b * y + a * y) EXP 3 + (b * x) EXP + (a * x + b * ;;

;;
‘(a * x + b * y + a * y) EXP 3 + (b * x) EXP 3 +
( a * x + b * y + b * x) EXP 3 + (a * y) EXP 3 = (a * x + a * y + b * x) EXP 3 + (b * y) EXP 3 + (a * y + b * y + b * x) EXP 3 + (a * x) EXP 3‘;;

;;

^[
^[[D
^[[C
end
;;

@jjoneslivingstone jjoneslivingstone changed the title Terminal Basics - Pastry Stuck & Related Commands HOL Terminal Basics, Issues and Related Commands Sep 30, 2022
@maggesi
Copy link

maggesi commented Sep 30, 2022

This often comes because you forget to close a backtick (``).
It can be solved by closing the backtick, e.g., by sending the sequence
`;;
Hope it helps.

@jjoneslivingstone
Copy link
Author

Yes. Solved with it. It was the earliest backtick which let the issue open. Thank you.

@jjoneslivingstone jjoneslivingstone changed the title HOL Terminal Basics, Issues and Related Commands HOL Terminal Basics, Issues, Grammar and Related Commands Sep 30, 2022
@jjoneslivingstone jjoneslivingstone changed the title HOL Terminal Basics, Issues, Grammar and Related Commands HOL Terminal Basics, Issues, Syntax and Related Commands Sep 30, 2022
@jjoneslivingstone
Copy link
Author

jjoneslivingstone commented Sep 30, 2022

Pardon me again: the issue was also due to the fact I was in need to correct the operator in the proposition. How may I correct a single character individuating it with the cursor instead of erasing the whole phrase till the point in question? Thank you.

@jjoneslivingstone jjoneslivingstone changed the title HOL Terminal Basics, Issues, Syntax and Related Commands HOL Terminal Basic Issues, Syntax and Related Commands Sep 30, 2022
@maggesi
Copy link

maggesi commented Sep 30, 2022

How may I correct a single character individuating it with the cursor instead of erasing the whole phrase till the point in question?

Short answer: it is not possible.

Long answer: there are a few workaround:

  1. Use line editors such as ledit or rlwrap.
  2. Use an improved OCaml toplevel such as utop.
  3. Never type your commands directly in the OCaml terminal. Instead write them in a text editor and copy/paste to OCaml. Most editors can be configured give support for this.

Personally I use option 3:
I run OCaml in a VScode terminal and I use the function workbench.action.terminal.runSelectedText (that I mapped to control-alt-enter).
My current setup, based on VScode devcontainers, is here: https://github.com/maggesi/hol-light-devcontainer

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

2 participants