Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
reason_toploop.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37# 1 "reason_toploop.cppo.ml" (* * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) (* this file's triggered by utop/rtop *) let main () = if List.exists ((=) "camlp4o") !Topfind.predicates || List.exists ((=) "camlp4r") !Topfind.predicates then print_endline "Reason is incompatible with camlp4!" else begin Toploop.parse_toplevel_phrase := Reason_util.correctly_catch_parse_errors (fun x -> let r = Reason_toolchain.To_current.copy_toplevel_phrase (Reason_toolchain.RE.toplevel_phrase x) in # 20 "reason_toploop.cppo.ml" (* NOTE(anmonteiro): after https://github.com/ocaml/ocaml/pull/12029, we get a Fatal error: exception Invalid_argument("index out of bounds") Raised by primitive operation at Toploop.ends_with_lf in file "toplevel/toploop.ml" Setting `lex_eof_reached` seems to avoid whatever check upstream is doing. *) x.lex_eof_reached <- true; # 28 "reason_toploop.cppo.ml" r); Toploop.parse_use_file := Reason_util.correctly_catch_parse_errors (fun x -> List.map Reason_toolchain.To_current.copy_toplevel_phrase (Reason_toolchain.RE.use_file x)); (* Toploop.print_out_sig_item := M17n_util.utf8_print_out_sig_item !Toploop.print_out_sig_item; *) (* Toploop.install_printer Predef.path_string Predef.type_string *) (* (fun fmt obj -> M17n_util.utf8_print_string fmt (Obj.magic obj)); *) end