plutus-tx-1.30.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Coverage

Synopsis

Documentation

data CoverageAnnotation Source #

Instances

Instances details
FromJSON CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

FromJSONKey CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

fromJSONKey ∷ FromJSONKeyFunction CoverageAnnotation

fromJSONKeyList ∷ FromJSONKeyFunction [CoverageAnnotation]

ToJSON CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

ToJSONKey CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

toJSONKey ∷ ToJSONKeyFunction CoverageAnnotation

toJSONKeyList ∷ ToJSONKeyFunction [CoverageAnnotation]

Generic CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Associated Types

type Rep CoverageAnnotationTypeType Source #

Read CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Show CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

NFData CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

rnfCoverageAnnotation → () Source #

Flat CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeCoverageAnnotation → Encoding

decode ∷ Get CoverageAnnotation

sizeCoverageAnnotation → NumBits → NumBits

Eq CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Ord CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Pretty CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Serialise CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeCoverageAnnotation → Encoding

decode ∷ Decoder s CoverageAnnotation

encodeList ∷ [CoverageAnnotation] → Encoding

decodeList ∷ Decoder s [CoverageAnnotation]

type Rep CoverageAnnotation Source # 
Instance details

Defined in PlutusTx.Coverage

newtype CoverageIndex Source #

This type keeps track of all coverage annotations and where they have been inserted / what annotations are expected to be found when executing a piece of code.

Instances

Instances details
FromJSON CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

parseJSON ∷ Value → Parser CoverageIndex

parseJSONList ∷ Value → Parser [CoverageIndex]

omittedFieldMaybe CoverageIndex

ToJSON CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

toJSONCoverageIndex → Value

toEncodingCoverageIndex → Encoding

toJSONList ∷ [CoverageIndex] → Value

toEncodingList ∷ [CoverageIndex] → Encoding

omitFieldCoverageIndexBool

Monoid CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Semigroup CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Generic CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Associated Types

type Rep CoverageIndexTypeType Source #

Show CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

NFData CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

rnfCoverageIndex → () Source #

Flat CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeCoverageIndex → Encoding

decode ∷ Get CoverageIndex

sizeCoverageIndex → NumBits → NumBits

Eq CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Ord CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Serialise CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeCoverageIndex → Encoding

decode ∷ Decoder s CoverageIndex

encodeList ∷ [CoverageIndex] → Encoding

decodeList ∷ Decoder s [CoverageIndex]

type Rep CoverageIndex Source # 
Instance details

Defined in PlutusTx.Coverage

type Rep CoverageIndex = D1 ('MetaData "CoverageIndex" "PlutusTx.Coverage" "plutus-tx-1.30.0.0-inplace" 'True) (C1 ('MetaCons "CoverageIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "_coverageMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CoverageAnnotation CoverageMetadata))))

newtype CoverageMetadata Source #

Constructors

CoverageMetadata 

Fields

Instances

Instances details
FromJSON CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

parseJSON ∷ Value → Parser CoverageMetadata

parseJSONList ∷ Value → Parser [CoverageMetadata]

omittedFieldMaybe CoverageMetadata

ToJSON CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Monoid CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Semigroup CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Generic CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Associated Types

type Rep CoverageMetadataTypeType Source #

Show CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

NFData CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

rnfCoverageMetadata → () Source #

Flat CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeCoverageMetadata → Encoding

decode ∷ Get CoverageMetadata

sizeCoverageMetadata → NumBits → NumBits

Eq CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Ord CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Pretty CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

prettyCoverageMetadataDoc ann #

prettyList ∷ [CoverageMetadata] → Doc ann #

Serialise CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeCoverageMetadata → Encoding

decode ∷ Decoder s CoverageMetadata

encodeList ∷ [CoverageMetadata] → Encoding

decodeList ∷ Decoder s [CoverageMetadata]

type Rep CoverageMetadata Source # 
Instance details

Defined in PlutusTx.Coverage

type Rep CoverageMetadata = D1 ('MetaData "CoverageMetadata" "PlutusTx.Coverage" "plutus-tx-1.30.0.0-inplace" 'True) (C1 ('MetaCons "CoverageMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "_metadataSet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set Metadata))))

data Metadata Source #

Constructors

ApplicationHeadSymbol String 
IgnoredAnnotation

Location that is not interesting to cover. This is not generated by the compiler, but can be added later using addCoverageMetadata.

Instances

Instances details
FromJSON Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

parseJSON ∷ Value → Parser Metadata

parseJSONList ∷ Value → Parser [Metadata]

omittedFieldMaybe Metadata

ToJSON Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

toJSONMetadata → Value

toEncodingMetadata → Encoding

toJSONList ∷ [Metadata] → Value

toEncodingList ∷ [Metadata] → Encoding

omitFieldMetadataBool

Generic Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Associated Types

type Rep MetadataTypeType Source #

Show Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

NFData Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

rnfMetadata → () Source #

Flat Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeMetadata → Encoding

decode ∷ Get Metadata

sizeMetadata → NumBits → NumBits

Eq Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Ord Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Pretty Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

prettyMetadataDoc ann #

prettyList ∷ [Metadata] → Doc ann #

Serialise Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeMetadata → Encoding

decode ∷ Decoder s Metadata

encodeList ∷ [Metadata] → Encoding

decodeList ∷ Decoder s [Metadata]

type Rep Metadata Source # 
Instance details

Defined in PlutusTx.Coverage

type Rep Metadata = D1 ('MetaData "Metadata" "PlutusTx.Coverage" "plutus-tx-1.30.0.0-inplace" 'False) (C1 ('MetaCons "ApplicationHeadSymbol" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "IgnoredAnnotation" 'PrefixI 'False) (U1TypeType))

newtype CoverageData Source #

Instances

Instances details
FromJSON CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

parseJSON ∷ Value → Parser CoverageData

parseJSONList ∷ Value → Parser [CoverageData]

omittedFieldMaybe CoverageData

ToJSON CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

toJSONCoverageData → Value

toEncodingCoverageData → Encoding

toJSONList ∷ [CoverageData] → Value

toEncodingList ∷ [CoverageData] → Encoding

omitFieldCoverageDataBool

Monoid CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

Semigroup CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

Generic CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

Associated Types

type Rep CoverageDataTypeType Source #

Show CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

NFData CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

rnfCoverageData → () Source #

Eq CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

Ord CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

type Rep CoverageData Source # 
Instance details

Defined in PlutusTx.Coverage

type Rep CoverageData = D1 ('MetaData "CoverageData" "PlutusTx.Coverage" "plutus-tx-1.30.0.0-inplace" 'True) (C1 ('MetaCons "CoverageData" 'PrefixI 'True) (S1 ('MetaSel ('Just "_coveredAnnotations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set CoverageAnnotation))))

data CoverageReport Source #

Instances

Instances details
FromJSON CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

parseJSON ∷ Value → Parser CoverageReport

parseJSONList ∷ Value → Parser [CoverageReport]

omittedFieldMaybe CoverageReport

ToJSON CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

toJSONCoverageReport → Value

toEncodingCoverageReport → Encoding

toJSONList ∷ [CoverageReport] → Value

toEncodingList ∷ [CoverageReport] → Encoding

omitFieldCoverageReportBool

Monoid CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Semigroup CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Generic CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Associated Types

type Rep CoverageReportTypeType Source #

Show CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

NFData CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

rnfCoverageReport → () Source #

Eq CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Ord CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Pretty CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

prettyCoverageReportDoc ann #

prettyList ∷ [CoverageReport] → Doc ann #

type Rep CoverageReport Source # 
Instance details

Defined in PlutusTx.Coverage

type Rep CoverageReport = D1 ('MetaData "CoverageReport" "PlutusTx.Coverage" "plutus-tx-1.30.0.0-inplace" 'False) (C1 ('MetaCons "CoverageReport" 'PrefixI 'True) (S1 ('MetaSel ('Just "_coverageIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CoverageIndex) :*: S1 ('MetaSel ('Just "_coverageData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CoverageData)))

data CovLoc Source #

A source location for coverage

Instances

Instances details
FromJSON CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

parseJSON ∷ Value → Parser CovLoc

parseJSONList ∷ Value → Parser [CovLoc]

omittedFieldMaybe CovLoc

ToJSON CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

toJSONCovLoc → Value

toEncodingCovLoc → Encoding

toJSONList ∷ [CovLoc] → Value

toEncodingList ∷ [CovLoc] → Encoding

omitFieldCovLocBool

Generic CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Associated Types

type Rep CovLocTypeType Source #

Methods

fromCovLocRep CovLoc x Source #

toRep CovLoc x → CovLoc Source #

Read CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Show CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

NFData CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

rnfCovLoc → () Source #

Flat CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeCovLoc → Encoding

decode ∷ Get CovLoc

sizeCovLoc → NumBits → NumBits

Eq CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

(==)CovLocCovLocBool Source #

(/=)CovLocCovLocBool Source #

Ord CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Pretty CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

prettyCovLocDoc ann #

prettyList ∷ [CovLoc] → Doc ann #

Serialise CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

Methods

encodeCovLoc → Encoding

decode ∷ Decoder s CovLoc

encodeList ∷ [CovLoc] → Encoding

decodeList ∷ Decoder s [CovLoc]

type Rep CovLoc Source # 
Instance details

Defined in PlutusTx.Coverage

type Rep CovLoc = D1 ('MetaData "CovLoc" "PlutusTx.Coverage" "plutus-tx-1.30.0.0-inplace" 'False) (C1 ('MetaCons "CovLoc" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_covLocFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Just "_covLocStartLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "_covLocEndLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "_covLocStartCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "_covLocEndCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

addCoverageMetadataCoverageAnnotationMetadataCoverageIndexCoverageIndex Source #

Add metadata to a coverage annotation. Does nothing if the annotation is not in the index.

addLocationToCoverageIndex ∷ MonadWriter CoverageIndex m ⇒ CovLoc → m CoverageAnnotation Source #

Include a location coverage annotation in the index

addBoolCaseToCoverageIndex ∷ MonadWriter CoverageIndex m ⇒ CovLocBoolCoverageMetadata → m CoverageAnnotation Source #

Include a boolean coverage annotation in the index