cuddle-1.1.0.0: CDDL Generator and test utilities
Safe HaskellNone
LanguageGHC2021

Codec.CBOR.Cuddle.CBOR.Validator

Documentation

data CDDLResult Source #

Constructors

Valid Rule

The rule was valid

ChoiceFail

All alternatives failed

Fields

  • Rule

    Rule we are trying

  • (NonEmpty Rule)

    The alternatives that arise from said rule

  • (NonEmpty (Rule, CDDLResult))

    For each alternative, the result

ListExpansionFail

All expansions failed

An expansion is: Given a CBOR TList of N elements, we will expand the rules in a list spec to match the number of items in the list.

Fields

  • Rule

    Rule we are trying

  • [[Rule]]

    List of expansions of rules

  • [[(Rule, CBORTermResult)]]

    For each expansion, for each of the rules in the expansion, the result

MapExpansionFail

All expansions failed

An expansion is: Given a CBOR TMap of N elements, we will expand the rules in a map spec to match the number of items in the map.

Fields

  • Rule

    Rule we are trying

  • [[Rule]]

    List of expansions

  • [([AMatchedItem], ANonMatchedItem)]

    A list of matched items (key, value, rule) and the unmatched item

InvalidControl

The rule was valid but the control failed

Fields

  • Rule

    Control we are trying

  • (Maybe CBORTermResult)

    If it is a .cbor, the result of the underlying validation

InvalidRule Rule 
InvalidTagged

A tagged was invalid

Fields

UnapplicableRule

The rule we are trying is not applicable to the CBOR term

Fields

  • String

    Extra information

  • Rule

    Rule we are trying

Instances

Instances details
Show CDDLResult Source # 
Instance details

Defined in Codec.CBOR.Cuddle.CBOR.Validator

data CBORTermResult Source #

Constructors

CBORTermResult 

Instances

Instances details
Show CBORTermResult Source # 
Instance details

Defined in Codec.CBOR.Cuddle.CBOR.Validator