summaryrefslogtreecommitdiff
path: root/lib/ocaml_rts/linksem/src_lem_library/either.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/src_lem_library/either.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/src_lem_library/either.ml')
-rw-r--r--lib/ocaml_rts/linksem/src_lem_library/either.ml24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/ocaml_rts/linksem/src_lem_library/either.ml b/lib/ocaml_rts/linksem/src_lem_library/either.ml
deleted file mode 100644
index ddf1b214..00000000
--- a/lib/ocaml_rts/linksem/src_lem_library/either.ml
+++ /dev/null
@@ -1,24 +0,0 @@
-type ('a, 'b) either =
- | Left of 'a
- | Right of 'b
-
-let either_case fa fb x = match x with
- | (Left a) -> fa a
- | (Right b) -> fb b
-
-let eitherEqualBy eql eqr (left: ('a, 'b) either) (right: ('a, 'b) either) =
- match (left, right) with
- | ((Left l), (Left l')) -> eql l l'
- | ((Right r), (Right r')) -> eqr r r'
- | _ -> false
-
-let rec either_partition l = ((match l with
- | [] -> ([], [])
- | x :: xs -> begin
- let (ll, rl) = (either_partition xs) in
- (match x with
- | (Left l) -> ((l::ll), rl)
- | (Right r) -> (ll, (r::rl))
- )
- end
-))