diff --git a/aurochs/compiler.ml b/aurochs/compiler.ml index 3ef8f08..b35b606 100644 --- a/aurochs/compiler.ml +++ b/aurochs/compiler.ml @@ -16,6 +16,6 @@ let compile ?(start="start") ?(base="") ?(root="root") ?(check=true) u = end; let peg_canonified = Canonify.canonify_grammar ~start peg in let pg = Noggie.generate_code ~start ~root peg_canonified in - Bytes.with_buffer_sink (Noggie.put_program pg peg) + Bytes_.with_buffer_sink (Noggie.put_program pg peg) let _ = compiler := compile diff --git a/aurochs/process.ml b/aurochs/process.ml index 732dec6..2f94728 100644 --- a/aurochs/process.ml +++ b/aurochs/process.ml @@ -418,7 +418,7 @@ let process fno = info `Normal "Loading NOG bytecode from file %s" fn; Aurochs.load (`File fn) | None -> - Bytes.with_buffer_sink (Noggie.put_program (!< pg) (!< peg)) + Bytes_.with_buffer_sink (Noggie.put_program (!< pg) (!< peg)) ) in diff --git a/backends/camelus.ml b/backends/camelus.ml index f6a99a7..11388f1 100644 --- a/backends/camelus.ml +++ b/backends/camelus.ml @@ -210,7 +210,7 @@ let generate_implementation ?(pack=true) fn start peg (pg : (string, string) pro build_printer "node_name" !Opt.node_prefix node_numbers; build_printer "attribute_name" !Opt.attribute_prefix attribute_numbers; - let u = Bytes.with_buffer_sink (Noggie.put_program pg peg) in + let u = Bytes_.with_buffer_sink (Noggie.put_program pg peg) in fp oc "\n"; fp oc "let binary =\n"; Stringifier.print_ocaml_string ~indent:4 () oc u; diff --git a/backends/noggie.ml b/backends/noggie.ml index 0bd301a..53a93a3 100644 --- a/backends/noggie.ml +++ b/backends/noggie.ml @@ -489,14 +489,14 @@ let put_program pg peg sk = let put_program pg peg sk = let sum64 = ref 0L in - let sk_sum64 = Bytes.checksum64 sum64 sk in + let sk_sum64 = Bytes_.checksum64 sum64 sk in put_program pg peg sk_sum64; Pack.write_uint64 sk !sum64 (* ***) (*** save_program *) let save_program_ascii ~prologue ~epilogue fn pg peg = Util.with_file_output fn (fun oc -> - let u = Bytes.with_buffer_sink (put_program pg peg) in + let u = Bytes_.with_buffer_sink (put_program pg peg) in let m = String.length u in output_string oc prologue; for i = 0 to m - 1 do @@ -508,7 +508,7 @@ let save_program_ascii ~prologue ~epilogue fn pg peg = output_string oc epilogue) (* ***) (*** save_program *) -let save_program fn pg peg = Util.with_binary_file_output fn (fun oc -> put_program pg peg (Bytes.sink_of_out_channel oc)) +let save_program fn pg peg = Util.with_binary_file_output fn (fun oc -> put_program pg peg (Bytes_.sink_of_out_channel oc)) (* ***) (*** generate *) let generate fn ?(start="start") peg = diff --git a/pack/pack.ml b/pack/pack.ml index 2f1c167..bff7eb1 100644 --- a/pack/pack.ml +++ b/pack/pack.ml @@ -1,11 +1,11 @@ (* Pack *) -open Bytes;; +open Bytes_;; open Int_operators;; -type packer = Bytes.sink;; +type packer = Bytes_.sink;; (*** write_byte *) -let write_byte sk x = Bytes.put_byte sk x;; +let write_byte sk x = Bytes_.put_byte sk x;; (* ***) (*** write_int64 *) let write_int64 sk x = @@ -77,7 +77,7 @@ let write_int sk x = write_int64 sk (!!!! x);; (*** test *) let test fn = let oc = open_out_bin fn in - let sk = Bytes.sink_of_out_channel oc in + let sk = Bytes_.sink_of_out_channel oc in let rec loop i x = let y = x in Printf.printf ">>> 0x%08Lx %Ld\n%!" y y; diff --git a/pack/pack.mli b/pack/pack.mli index 3e8438f..0fd8059 100644 --- a/pack/pack.mli +++ b/pack/pack.mli @@ -1,6 +1,6 @@ (* Pack *) -type packer = Bytes.sink;; +type packer = Bytes_.sink;; val write_byte : packer -> int -> unit val write_int64 : packer -> int64 -> unit diff --git a/util/bytes.ml b/util/bytes_.ml similarity index 99% rename from util/bytes.ml rename to util/bytes_.ml index 64f7048..306b193 100644 --- a/util/bytes.ml +++ b/util/bytes_.ml @@ -1,4 +1,4 @@ -(* Bytes *) +(* Bytes_ *) open Int_operators;; diff --git a/util/bytes.mli b/util/bytes_.mli similarity index 99% rename from util/bytes.mli rename to util/bytes_.mli index fa82fd0..3a49bd0 100644 --- a/util/bytes.mli +++ b/util/bytes_.mli @@ -1,4 +1,4 @@ -(* Bytes *) +(* Bytes_ *) (** Module for byte sinks and sources. *)