HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

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.

  • 1 type
  • 2 values
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
valuedependent
  1. :: Ord tok
  2. => Net op ans tok
  3. -> [Answered op ans]
  4. -> [Answered op ans]
  5. -> Bool
#

Is some operation of the second list dependent on (touching a token of) some operation of the first?

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.