HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulevortex-journal-0.1.0GHC2024

Vortex.Journal.Concurrent

Appending at a version: optimistic concurrency. A writer decides against the log as it stood at some version and asks to append there. If nothing recorded since touches a token its operations touch, the order does not matter (independent operations commute) and the append goes through; otherwise it is a conflict, and the writer decides again.

Synopsis
datadata Conflict op ans tok

Why an append at a version did not go through.

Constructors

Instances2Eq, Show
  • (Eq op, Eq ans, Eq tok) => Eq (Conflict op ans tok)Defined in vortex-journal-0.1.0 · Vortex.Journal.Concurrent
  • (Show op, Show ans, Show tok) => Show (Conflict op ans tok)Defined in vortex-journal-0.1.0 · Vortex.Journal.Concurrent
valueappendAt
  1. :: Ord tok
  2. => Net op ans tok
  3. -> Log op ans tok
  4. -> Version
  5. -> [Answered op ans]
  6. -> Either (Conflict op ans tok) (Log op ans tok)

Append operations decided at a version. At the log's own version this is a plain append; behind it, the append goes through only if it is independent of everything recorded since.