| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Conformance.Compare.Perturbation
Description
Discovered changes to every value the model declares observable.
Synopsis
- data Step
- leafPaths :: Value -> [[Step]]
- arrayPaths :: Value -> [[Step]]
- perturbAt :: [Step] -> Value -> Value
- appendAt :: [Step] -> Value -> Value
- isLovelaceFloor :: Text -> [Step] -> Bool
- reportedDifferences :: [Difference] -> [(Text, [Step])]
- differingPaths :: Value -> Value -> [[Step]]
- replacing :: Text -> Value -> Value -> Value
- discoveredChanges :: Declared -> Value -> [(Text, [Step], Value)]
- checkPerturbations :: Declared -> Value -> Value -> Either String (Int, Map Text Int, [String])
Documentation
Instances
| Show Step Source # | |
Defined in Conformance.Compare.Perturbation | |
| Eq Step Source # | |
Defined in Conformance.Compare.Perturbation | |
arrayPaths :: Value -> [[Step]] 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 #
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.