HORIZON HASKELLDocslts/ghc-9.14.xb2f3bfd2026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

Modulecrypton-asn1-types-0.4.1Haskell98

Data.ASN1.Stream

  • 1 type
  • 2 values
typetype ASN1Repr = (ASN1, [ASN1Event])
#

Type synonym representing pairs of a ASN.1 value and a list of ASN.1 events.

This association is sometimes needed in order to know the exact byte sequence leading to an ASN.1 value. For example, in the case of a cryptographic signature.

Utilities

2 declarations
valuegetConstructedEnd
  1. :: Int

    The number of additional Start values encountered, 0 initially.

  2. -> [ASN1]
  3. -> ([ASN1], [ASN1])
#

For the given list of ASN.1 values, assumed to follow a Start value:

If the list is empty, return a pair of empty lists.

Otherwise, return a list of values up to (but excluding) the corresponding End value (if any), and a list of the remaining ASN.1 values.

For the given list of ASN1Repr pairs:

If the list is empty, return a pair of empty lists.

If the first item represents a Start value, return a list of pairs up to the corresponding End value (if any) (including the Start and any End) and a list of the remaining ASN1Repr pairs.

Otherwise, return a list of that first item and a list of the remaining pairs.