Implement most of the spec reusing scribe & nefthera code

This commit is contained in:
Juno Takano 2025-04-09 01:59:32 -03:00
commit 612a98cfde
16 changed files with 225 additions and 25 deletions

14
ocaml/lib/system/file.ml Normal file
View file

@ -0,0 +1,14 @@
let read_channel channel =
let buffer = Buffer.create 4096 in
let rec read () =
let line = input_line channel in
Buffer.add_string buffer line;
Buffer.add_char buffer '\n';
read ()
in
try read () with
End_of_file -> Buffer.contents buffer
let read path =
let channel = open_in path in
read_channel channel