aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols/Program.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/protocols/Program.ml16
-rw-r--r--lib/protocols/Program.mli15
2 files changed, 0 insertions, 31 deletions
diff --git a/lib/protocols/Program.ml b/lib/protocols/Program.ml
deleted file mode 100644
index e50f07d..0000000
--- a/lib/protocols/Program.ml
+++ /dev/null
@@ -1,16 +0,0 @@
-module type PROGRAM = sig
- type t
-end
-
-module Make (P : PROGRAM) = struct
- class type implementation = object
- method invoke : P.t -> (Handle.t, Concepts.Condition.condition) result
- end
-
- type Handle.protocol += Program of implementation
- type t = implementation
-
- let make impl = Program (impl :> implementation)
- let from handle = Handle.into handle (function Program impl -> Some impl | _ -> None)
- let invoke i program = Handle.invoke i (fun o -> o#invoke program)
-end
diff --git a/lib/protocols/Program.mli b/lib/protocols/Program.mli
deleted file mode 100644
index 6cdffd8..0000000
--- a/lib/protocols/Program.mli
+++ /dev/null
@@ -1,15 +0,0 @@
-module type PROGRAM = sig
- type t
-end
-
-module Make (P : PROGRAM) : sig
- type t
-
- class type implementation = object
- method invoke : P.t -> (Handle.t, Concepts.Condition.condition) result
- end
-
- val make : #implementation -> Handle.protocol
- val from : Handle.t -> t Handle.interface option
- val invoke : t Handle.interface -> P.t -> (Handle.t, Concepts.Condition.condition) result
-end