| License | Apache-2.0 |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
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
- data Program = Program {
- programRow :: String
- programRegistries :: [Registry]
- programWallets :: [Wallet]
- programCohort :: forall reg wal. [reg] -> [wal] -> Either String [(reg, EdgeRequest wal)]
- programStory :: forall reg wal step obs cmp. [reg] -> [wal] -> Either String (Story reg wal step obs cmp ())
- programExpected :: [Expected]
- programStanding :: Standing
- programControls :: [String]
- programChapter :: Maybe Chapter
- data Registry = Registry {
- registryName :: String
- registryReading :: String
- registryProcessingMs :: Integer
- registryRetractionMs :: Integer
- data Wallet = Wallet {
- walletRole :: WalletRole
- walletReading :: String
- data WalletRole
- = RunnerWallet
- | SecondWallet
- | OwnerWallet Integer
- data Expected
- = Agrees
- | Diverges {
- divergenceChain :: Text
- divergenceModel :: Text
- divergenceTrace :: Text
- divergenceIssue :: Text
- data Standing
- = Agreement
- | Held {
- heldFor :: String
- heldLean :: String
- heldConsumer :: String
- | Unmet {
- unmetRuling :: String
- unmetRegistry :: String
- unmetConsumer :: String
- data Chapter = Chapter {
- chapterTitle :: String
- chapterIntroduction :: String
- chapterSummary :: String
- data Kind
- data Classification
- programs :: [Program]
- programFor :: String -> Maybe Program
- outsideVocabulary :: [(Text, Text)]
- classify :: Text -> Either String Classification
- classifyGroup :: [Text] -> Either String [(Text, Classification)]
- kindOf :: Program -> Either String Kind
- recordsOf :: Program -> Either String Int
- displayStory :: Program -> Either String (Story String String String String String ())
- displayCohort :: Program -> Either String [(String, EdgeRequest String)]
Documentation
One row's program.
Constructors
| Program | |
Fields
| |
A registry a program acts on, booted fresh for its row.
Constructors
| Registry | |
Fields
| |
Instances
| Show Registry Source # | |
Defined in Conformance.Edge.Programs | |
| Eq Registry Source # | |
Defined in Conformance.Edge.Programs | |
A wallet a program names, beside the name the book reads.
Constructors
| Wallet | |
Fields
| |
Instances
| Show Wallet Source # | |
Defined in Conformance.Edge.Programs | |
| Eq Wallet Source # | |
Defined in Conformance.Edge.Programs | |
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
| Show WalletRole Source # | |
Defined in Conformance.Edge.Programs Methods showsPrec :: Int -> WalletRole -> ShowS Source # show :: WalletRole -> String Source # showList :: [WalletRole] -> ShowS Source # | |
| Eq WalletRole Source # | |
Defined in Conformance.Edge.Programs Methods (==) :: WalletRole -> WalletRole -> Bool Source # (/=) :: WalletRole -> WalletRole -> Bool 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
| Show Expected Source # | |
Defined in Conformance.Edge.Programs | |
| Eq Expected Source # | |
Defined in Conformance.Edge.Programs | |
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
| Show Standing Source # | |
Defined in Conformance.Edge.Programs | |
| Eq Standing Source # | |
Defined in Conformance.Edge.Programs | |
A program the book renders as a chapter of its own.
Constructors
| Chapter | |
Fields
| |
Instances
| Show Chapter Source # | |
Defined in Conformance.Edge.Programs | |
| Eq Chapter Source # | |
Defined in Conformance.Edge.Programs | |
Whether a program composes edges or tampers with an edge's transaction.
Constructors
| EdgeComposition | |
| Tamper |
Instances
| Show Kind Source # | |
Defined in Conformance.Edge.Programs | |
| Eq Kind Source # | |
Defined in Conformance.Edge.Programs | |
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
| Show Classification Source # | |
Defined in Conformance.Edge.Programs Methods showsPrec :: Int -> Classification -> ShowS Source # show :: Classification -> String Source # showList :: [Classification] -> ShowS Source # | |
| Eq Classification Source # | |
Defined in Conformance.Edge.Programs Methods (==) :: Classification -> Classification -> Bool Source # (/=) :: Classification -> Classification -> Bool Source # | |
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.
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.