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.Log

The log: the history of answered operations, appended to and never rewritten. The state is never stored; it is the fold of the log through the net, from the initial marking or from a snapshot the log resumed.

  • 4 types
  • 18 values

Versions

3 declarations
newtypenewtype Version
#

How many operations a log has recorded since its genesis.

Instances3Eq, Ord, Show
  • Eq VersionDefined in vortex-journal-0.1.0 · Vortex.Journal.Log
  • Ord VersionDefined in vortex-journal-0.1.0 · Vortex.Journal.Log
  • Show VersionDefined in vortex-journal-0.1.0 · Vortex.Journal.Log

Logs

12 declarations
datadata Log op ans tok
#

A log of answered operations over a base.

Instances2Eq, Show
  • (Eq tok, Eq op, Eq ans) => Eq (Log op ans tok)Defined in vortex-journal-0.1.0 · Vortex.Journal.Log
  • (Show tok, Show op, Show ans) => Show (Log op ans tok)Defined in vortex-journal-0.1.0 · Vortex.Journal.Log
datadata Origin tok
#

Where a log's fold starts: the net's initial marking, or a snapshot's marking at the snapshot's version.

Constructors

Instances2Eq, Show
  • Eq tok => Eq (Origin tok)Defined in vortex-journal-0.1.0 · Vortex.Journal.Log
  • Show tok => Show (Origin tok)Defined in vortex-journal-0.1.0 · Vortex.Journal.Log
valueempty :: Log op ans tok
#

The log with nothing recorded.

valueappend :: Log op ans tok -> Answered op ans -> Log op ans tok
#

Record one more answered operation.

valueversion :: Log op ans tok -> Version
#

The log's version: its base's, plus what it recorded since.

valuebase :: Log op ans tok -> Log op ans tok
#

The log's base with nothing recorded on it.

valuefold :: Ord tok => Net op ans tok -> Log op ans tok -> Marking tok
#

The state: the log folded through the net from its base.

valueprefix
  1. :: (Eq op, Eq ans, Eq tok)
  2. => Log op ans tok
  3. -> Log op ans tok
  4. -> Bool
#

Is the first log a prefix of the second: the same base, and the second recorded everything the first did, first?

valuevalid :: Ord tok => Net op ans tok -> Log op ans tok -> Bool
#

Was every recorded operation enabled where it was recorded?

Positions in a log

3 declarations
valueknown :: Log op ans tok -> Version -> Bool
#

Is a version one the log can be cut at: no earlier than its base and no later than its end?

valuecut :: Log op ans tok -> Version -> Log op ans tok
#

The log as it stood at a version (clamped to the versions it knows).

Recording and replaying

4 declarations
datadata Refusal op ans tok
#

Why the journal will not record a step.

Constructors

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

Record recorded operations again onto a log, checking each one and reading its recorded answer rather than asking for it.

valueresumeAt :: Version -> Marking tok -> Log op ans tok
#

The log that resumes from a marking at a version, with nothing recorded since.