conformance
Safe HaskellNone
LanguageGHC2021

Conformance.Compare.Perturbation

Description

Discovered changes to every value the model declares observable.

Synopsis

Documentation

data Step Source #

Constructors

Field Text 
Index Int 

Instances

Instances details
Show Step Source # 
Instance details

Defined in Conformance.Compare.Perturbation

Methods

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

show :: Step -> String Source #

showList :: [Step] -> ShowS Source #

Eq Step Source # 
Instance details

Defined in Conformance.Compare.Perturbation

Methods

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

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

leafPaths :: Value -> [[Step]] Source #

arrayPaths :: Value -> [[Step]] Source #

perturbAt :: [Step] -> Value -> Value Source #

appendAt :: [Step] -> Value -> Value Source #

isLovelaceFloor :: Text -> [Step] -> Bool Source #

A leaf the model states as a lovelace floor: a transaction output's lovelace, and a payment's value in paid and in the transaction's refunds.

reportedDifferences :: [Difference] -> [(Text, [Step])] Source #

Every path at which a reported difference's two sides differ, down to a leaf or to an array whose length differs.

differingPaths :: Value -> Value -> [[Step]] Source #

replacing :: Text -> Value -> Value -> Value Source #

discoveredChanges :: Declared -> Value -> [(Text, [Step], Value)] Source #

The same walk is used by the appendix and every live comparison.

checkPerturbations :: Declared -> Value -> Value -> Either String (Int, Map Text Int, [String]) Source #

Count every refused change by the observation the comparator named. The sole allowed passing change is surplus above a lovelace floor.