utop
utop copied to clipboard
`input-multi:` command should split on phrase terminator before attempting to parse
When gobbling up the following file using utop-eval-buffer
in Emacs (i.e. with C-c C-b), the first time produces an error, while the second time (after utop
is already open) works smoothly:
#use "topfind";;
#require "sedlex.ppx";;
let f buf = match%sedlex buf with
| _ -> assert false;;
The error the first time around is
Line 4, characters 18-24:
Error: Uninterpreted extension 'sedlex'.
Speculation below:
- This looks like a close cousin to #192
- I can imagine utop trying to parse the entire file, and failing because
match%sedlex
won't parse until the#require
directive has been allowed to mutate utop's state.
Tested on Mac OS X Catalina du jour (10.15.5), ocaml version 4.08.1 and utop rebuilt from the master branch