Skip to content

Commit

Permalink
Support camlp5 by lazily loading Toploop.parse_toplevel_phrase
Browse files Browse the repository at this point in the history
  • Loading branch information
aqjune committed Apr 23, 2024
1 parent 384b309 commit cc6ce3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/uTop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ let parse_default parse str eos_is_error =
| exn ->
Error ([], "Unknown parsing error (please report it to the utop project): " ^ Printexc.to_string exn)

let parse_toplevel_phrase_default = parse_default Parse.toplevel_phrase
let parse_toplevel_phrase_default = fun str -> parse_default !Toploop.parse_toplevel_phrase str
let parse_toplevel_phrase = ref parse_toplevel_phrase_default

let parse_use_file_default = parse_default Parse.use_file
Expand Down

0 comments on commit cc6ce3d

Please sign in to comment.