File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,3 +35,4 @@ result*
3535/coq-plugin /theories /Loader.vok
3636/coq-plugin /theories /Loader.vos
3737catt-web.opam
38+ _opam /
Original file line number Diff line number Diff line change @@ -22,16 +22,18 @@ let parse s =
2222 option '--no-builtins' to deactivate the use of built-ins"
2323 x)
2424
25- let parse_file f =
26- let sin =
27- let fi = open_in f in
28- let flen = in_channel_length fi in
29- let buf = Bytes. create flen in
30- really_input fi buf 0 flen;
31- close_in fi;
32- buf
25+ let read_file_to_string path =
26+ let rec read_stream stream =
27+ try
28+ let line = input_line stream in
29+ line :: (read_stream stream)
30+ with End_of_file ->
31+ []
3332 in
34- parse (Bytes. to_string sin)
33+ let stream = open_in path in
34+ String. concat " \n " (read_stream stream)
35+
36+ let parse_file f = parse (read_file_to_string f)
3537
3638let reset () =
3739 Environment. reset () ;
You can’t perform that action at this time.
0 commit comments