ocaml-community / utop

Universal toplevel for OCaml
Other
846 stars 113 forks source link

`input-multi:` command should split on phrase terminator before attempting to parse #331

Open domq opened 4 years ago

domq commented 4 years ago

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:

domq commented 4 years ago

Tested on Mac OS X Catalina du jour (10.15.5), ocaml version 4.08.1 and utop rebuilt from the master branch