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.
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 (afterutop
is already open) works smoothly:The error the first time around is
Speculation below:
match%sedlex
won't parse until the#require
directive has been allowed to mutate utop's state.