conformance
LicenseApache-2.0
Safe HaskellNone
LanguageGHC2021

Conformance.Edge.Programs

Description

The registry rows of the inventory, each either a program over the story language's instructions — an edge composition, or a tamper of an edge's transaction — or named outside the model's vocabulary with its reason. A program says which registries it boots and which wallets it names, the requests it books before its first instruction, what each compared record must show and how its outcome stands against the consuming project's requirement. The live runner executes it through the generic interpreter and the book renders the same program; neither holds a second description of a row.

Synopsis

Documentation

data Program Source #

One row's program.

Constructors

Program 

Fields

data Registry Source #

A registry a program acts on, booted fresh for its row.

Constructors

Registry 

Fields

Instances

Instances details
Show Registry Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

showsPrec :: Int -> Registry -> ShowS Source #

show :: Registry -> String Source #

showList :: [Registry] -> ShowS Source #

Eq Registry Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

(==) :: Registry -> Registry -> Bool Source #

(/=) :: Registry -> Registry -> Bool Source #

data Wallet Source #

A wallet a program names, beside the name the book reads.

Constructors

Wallet 

Fields

Instances

Instances details
Show Wallet Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

showsPrec :: Int -> Wallet -> ShowS Source #

show :: Wallet -> String Source #

showList :: [Wallet] -> ShowS Source #

Eq Wallet Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

(==) :: Wallet -> Wallet -> Bool Source #

(/=) :: Wallet -> Wallet -> Bool Source #

data WalletRole Source #

Which wallet of the run a program's wallet is.

Constructors

RunnerWallet

the wallet the run signs and funds every fold with

SecondWallet

a second wallet the run funds once

OwnerWallet Integer

a wallet that books requests and receives no fold's change, funded with this lovelace when the row starts

Instances

Instances details
Show WalletRole Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

showsPrec :: Int -> WalletRole -> ShowS Source #

show :: WalletRole -> String Source #

showList :: [WalletRole] -> ShowS Source #

Eq WalletRole Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

(==) :: WalletRole -> WalletRole -> Bool Source #

(/=) :: WalletRole -> WalletRole -> Bool Source #

data Expected Source #

What one compared record of a program must show.

Constructors

Agrees

the chain and the model reach the same outcome, for the same reason

Diverges

a recorded disagreement, never a pass: the chain's and the model's outcomes, the reason the traced replay admits for the chain, and the issue that tracks it

Fields

Instances

Instances details
Show Expected Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

showsPrec :: Int -> Expected -> ShowS Source #

show :: Expected -> String Source #

showList :: [Expected] -> ShowS Source #

Eq Expected Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

(==) :: Expected -> Expected -> Bool Source #

(/=) :: Expected -> Expected -> Bool Source #

data Standing Source #

How a program row stands against the consuming project's requirement.

Constructors

Agreement

the row's outcome is what the requirement asks

Held

the consuming project's theorem and the model disagree; held

Fields

Unmet

the requirement is kept unmet by a ruling

Fields

Instances

Instances details
Show Standing Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

showsPrec :: Int -> Standing -> ShowS Source #

show :: Standing -> String Source #

showList :: [Standing] -> ShowS Source #

Eq Standing Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

(==) :: Standing -> Standing -> Bool Source #

(/=) :: Standing -> Standing -> Bool Source #

data Chapter Source #

A program the book renders as a chapter of its own.

Constructors

Chapter 

Fields

Instances

Instances details
Show Chapter Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

showsPrec :: Int -> Chapter -> ShowS Source #

show :: Chapter -> String Source #

showList :: [Chapter] -> ShowS Source #

Eq Chapter Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

(==) :: Chapter -> Chapter -> Bool Source #

(/=) :: Chapter -> Chapter -> Bool Source #

data Kind Source #

Whether a program composes edges or tampers with an edge's transaction.

Constructors

EdgeComposition 
Tamper 

Instances

Instances details
Show Kind Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

showsPrec :: Int -> Kind -> ShowS Source #

show :: Kind -> String Source #

showList :: [Kind] -> ShowS Source #

Eq Kind Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

(==) :: Kind -> Kind -> Bool Source #

(/=) :: Kind -> Kind -> Bool Source #

data Classification Source #

How a registry row is run.

Constructors

Composed Kind

a program of this kind

Outside Text

outside the model's vocabulary, for this reason

Instances

Instances details
Show Classification Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

showsPrec :: Int -> Classification -> ShowS Source #

show :: Classification -> String Source #

showList :: [Classification] -> ShowS Source #

Eq Classification Source # 
Instance details

Defined in Conformance.Edge.Programs

Methods

(==) :: Classification -> Classification -> Bool Source #

(/=) :: Classification -> Classification -> Bool Source #

programs :: [Program] Source #

Every program, the book's chapters first, in book order.

programFor :: String -> Maybe Program Source #

The program of a row, if it has one.

outsideVocabulary :: [(Text, Text)] Source #

The registry rows the model cannot express, each with its reason. A row here has no program; the ones a run still executes for their chain evidence do so through their own runner.

classify :: Text -> Either String Classification Source #

How one registry row is run.

classifyGroup :: [Text] -> Either String [(Text, Classification)] Source #

Every row of the registry group classified exactly once. An empty group, or a program or reason for a row the group does not hold, is refused.

kindOf :: Program -> Either String Kind Source #

A program's kind, read off its instructions.

recordsOf :: Program -> Either String Int Source #

How many records a program compares: one per compared request, one per batch.

displayStory :: Program -> Either String (Story String String String String String ()) Source #

A program's story over the display names the book reads.

displayCohort :: Program -> Either String [(String, EdgeRequest String)] Source #

A program's cohort over the display names the book reads.