diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-10-07 18:25:43 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-10-07 18:25:43 -0300 |
| commit | 932e657e38665afa1da1aab549977841abbd9dcf (patch) | |
| tree | b2c0b3d30b7aaab7347300b3932a9f03e4f64f9a /lib/protocols/Journal.ml | |
| parent | cfc641a9bb97c94e5993f895a8bcdf24214adc83 (diff) | |
| download | RNT-932e657e38665afa1da1aab549977841abbd9dcf.tar.gz RNT-932e657e38665afa1da1aab549977841abbd9dcf.zip | |
drop journal in favor of local branch history
Diffstat (limited to 'lib/protocols/Journal.ml')
| -rw-r--r-- | lib/protocols/Journal.ml | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/protocols/Journal.ml b/lib/protocols/Journal.ml deleted file mode 100644 index 392eb5a..0000000 --- a/lib/protocols/Journal.ml +++ /dev/null @@ -1,25 +0,0 @@ -type change = {name: string; expected: Handle.t option; replacement: Handle.t option} -type commit = {number: int; snapshot: Handle.t; changed: string list} -type proposal = {previous: commit; proposed: commit} -type guard = proposal -> (unit, Concepts.Condition.condition) result -type observer = commit -> unit - -class type implementation = object - method commit : change list -> (commit option, Concepts.Condition.condition) result - method head : commit - method history : commit list - method guard : string -> guard option -> unit - method observe : string -> observer option -> unit -end - -type Handle.protocol += Journal of implementation -type t = implementation - -let make impl = Journal (impl :> implementation) -let from handle = Handle.into handle (function Journal impl -> Some impl | _ -> None) -let require = Handle.require from -let commit i changes = Handle.invoke i (fun o -> o#commit changes) -let head i = Handle.invoke i (fun o -> o#head) -let history i = Handle.invoke i (fun o -> o#history) -let guard i name g = Handle.invoke i (fun o -> o#guard name g) -let observe i name f = Handle.invoke i (fun o -> o#observe name f) |
