down only recognizes the first top-level statement of several ones when copy-and-pasted
aqjune opened this issue · comments
Hi, thanks for a nice tool.
I found that down only recognizes the first statement when I copy-and-pasted several statements at once.
For example, let's assume that I copied these two lines from somewhere:
let x = 10;;
let y = 20;;
If I paste it at ocaml after #use "down.top"
, only x
is defined, but not y
.
OCaml version 4.14.0
Enter #help;; for help.
# #use "down.top";;
Down v0.1.0 loaded. Type Down.help () for more info.
# let x = 10;;
val x : int = 10
# (* where is y? *)
Thanks!
Yes that's a limitation of ocaml
itself see ocaml/ocaml#8813
Oh, I didn't realize that was the limitation of ocaml
itself. I wasn't aware of it because I was using rlwrap ocaml
which successfully deals with this case. I will leave a comment there.
rlwrap ocaml
which successfully deals with this case.
Mmmh I guess it splits on newlines and feeds it line by line. But something like pasting
let x = 10;; let y = 20;;
shouldn't work.
I see, so even rlwrap
isn't the complete solution yet. Will close this issue since this is ocaml
's problem