summaryrefslogtreecommitdiff
path: root/lib/ocaml_rts/linksem/byte_sequence_wrapper.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-01-18 18:16:45 +0000
committerAlasdair Armstrong2018-01-18 18:31:26 +0000
commit0fa42d315e20f819af93c2a822ab1bc032dc4535 (patch)
tree7ef4ea3444ba5938457e7c852f9ad9957055fe41 /lib/ocaml_rts/linksem/byte_sequence_wrapper.ml
parent24dc13511053ab79ccb66ae24e3b8ffb9cad0690 (diff)
Modified ocaml backend to use ocamlfind for linksem and lem
Fixed test cases for ocaml backend and interpreter
Diffstat (limited to 'lib/ocaml_rts/linksem/byte_sequence_wrapper.ml')
-rw-r--r--lib/ocaml_rts/linksem/byte_sequence_wrapper.ml33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/ocaml_rts/linksem/byte_sequence_wrapper.ml b/lib/ocaml_rts/linksem/byte_sequence_wrapper.ml
deleted file mode 100644
index 69efcc8d..00000000
--- a/lib/ocaml_rts/linksem/byte_sequence_wrapper.ml
+++ /dev/null
@@ -1,33 +0,0 @@
-open Big_int
-
-open Error
-
-let acquire_char_list (fname : string) =
- let char_list = ref [] in
- try
- let ic = open_in_bin fname in
- while true do
- let c = input_char ic in
- let _ = char_list := c :: !char_list in
- ()
- done;
- let _ = close_in ic in
- Fail "acquire_char_list: the impossible happened"
- with End_of_file ->
- Success (List.rev !char_list)
-;;
-
-let serialise_char_list (fname : string) bytes =
- let rec go oc bytes =
- match bytes with
- | [] -> ()
- | x::xs -> output_char oc x; go oc xs
- in
- try
- let oc = open_out_bin fname in
- let _ = go oc bytes in
- let _ = close_out oc in
- Success ()
- with _ ->
- Fail "serialise_char_list: unable to open file for writing"
-;; \ No newline at end of file