| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Codec.CBOR.Cuddle.CDDL.CTree
Contents
Synopsis
- data family XXCTree i
- data CTreePhase
- data CTree i
- traverseCTree :: Monad m => (XXCTree i -> m (CTree j)) -> (CTree i -> m (CTree j)) -> CTree i -> m (CTree j)
- foldCTree :: (XXCTree i -> CTree j) -> (CTree i -> CTree j) -> CTree i -> CTree j
- type Node i = XXCTree i
- newtype CTreeRoot i = CTreeRoot (Map Name (CTree i))
- data PTerm
Resolved CDDL Tree
data family XXCTree i Source #
Instances
| Show (XXCTree ValidatorStage) Source # | |
Defined in Codec.CBOR.Cuddle.CBOR.Validator | |
| newtype XXCTree ValidatorStage Source # | |
Defined in Codec.CBOR.Cuddle.CBOR.Validator | |
| data XXCTree MonoReferenced Source # | |
Defined in Codec.CBOR.Cuddle.CDDL.Resolve | |
data CTreePhase Source #
Instances
Constructors
| Literal Value | |
| Postlude PTerm | |
| Map [CTree i] | |
| Array [CTree i] | |
| Choice (NonEmpty (CTree i)) | |
| Group [CTree i] | |
| KV | |
| Occur | |
Fields
| |
| Range | |
| Control | |
| Enum (CTree i) | |
| Unwrap (CTree i) | |
| Tag Word64 (CTree i) | |
| CTreeE (XXCTree i) | |
Instances
| IndexMappable CTree MonoReferenced ValidatorStage Source # | |||||
Defined in Codec.CBOR.Cuddle.CBOR.Validator Methods mapIndex :: CTree MonoReferenced -> CTree ValidatorStage Source # | |||||
| Generic (CTree i) Source # | |||||
Defined in Codec.CBOR.Cuddle.CDDL.CTree Associated Types
| |||||
| Show (Node f) => Show (CTree f) Source # | |||||
| Eq (Node f) => Eq (CTree f) Source # | |||||
| Hashable (Node f) => Hashable (CTree f) Source # | |||||
Defined in Codec.CBOR.Cuddle.CDDL.CTree | |||||
| type Rep (CTree i) Source # | |||||
Defined in Codec.CBOR.Cuddle.CDDL.CTree type Rep (CTree i) = D1 ('MetaData "CTree" "Codec.CBOR.Cuddle.CDDL.CTree" "cuddle-1.1.0.0-FBfXbuYjcH55Ev8TDYHISa" 'False) (((C1 ('MetaCons "Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)) :+: (C1 ('MetaCons "Postlude" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PTerm)) :+: C1 ('MetaCons "Map" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CTree i])))) :+: ((C1 ('MetaCons "Array" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CTree i])) :+: C1 ('MetaCons "Choice" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (CTree i))))) :+: (C1 ('MetaCons "Group" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CTree i])) :+: C1 ('MetaCons "KV" 'PrefixI 'True) (S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i)) :*: (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i)) :*: S1 ('MetaSel ('Just "cut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))) :+: ((C1 ('MetaCons "Occur" 'PrefixI 'True) (S1 ('MetaSel ('Just "item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i)) :*: S1 ('MetaSel ('Just "occurs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OccurrenceIndicator)) :+: (C1 ('MetaCons "Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "from") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i)) :*: (S1 ('MetaSel ('Just "to") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i)) :*: S1 ('MetaSel ('Just "inclusive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RangeBound))) :+: C1 ('MetaCons "Control" 'PrefixI 'True) (S1 ('MetaSel ('Just "op") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CtlOp) :*: (S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i)) :*: S1 ('MetaSel ('Just "controller") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i)))))) :+: ((C1 ('MetaCons "Enum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i))) :+: C1 ('MetaCons "Unwrap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i)))) :+: (C1 ('MetaCons "Tag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTree i))) :+: C1 ('MetaCons "CTreeE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (XXCTree i))))))) | |||||
traverseCTree :: Monad m => (XXCTree i -> m (CTree j)) -> (CTree i -> m (CTree j)) -> CTree i -> m (CTree j) Source #
Traverse the CTree, carrying out the given operation at each node
Instances
| IndexMappable CTreeRoot MonoReferenced ValidatorStage Source # | |||||
Defined in Codec.CBOR.Cuddle.CBOR.Validator Methods mapIndex :: CTreeRoot MonoReferenced -> CTreeRoot ValidatorStage Source # | |||||
| Generic (CTreeRoot i) Source # | |||||
Defined in Codec.CBOR.Cuddle.CDDL.CTree Associated Types
| |||||
| Show (CTree i) => Show (CTreeRoot i) Source # | |||||
| type Rep (CTreeRoot i) Source # | |||||
Defined in Codec.CBOR.Cuddle.CDDL.CTree | |||||
CDDL predefines a number of names. This subsection summarizes these names, but please see Appendix D for the exact definitions.
The following keywords for primitive datatypes are defined:
"bool" Boolean value (major type 7, additional information 20 or 21).
"uint" An unsigned integer (major type 0).
"nint" A negative integer (major type 1).
"int" An unsigned integer or a negative integer.
"float16" A number representable as a half-precision float [IEEE754] (major type 7, additional information 25).
"float32" A number representable as a single-precision float [IEEE754] (major type 7, additional information 26).
"float64" A number representable as a double-precision float [IEEE754] (major type 7, additional information 27).
"float" One of float16, float32, or float64.
"bstr" or "bytes" A byte string (major type 2).
"tstr" or "text" Text string (major type 3).
(Note that there are no predefined names for arrays or maps; these are defined with the syntax given below.)
Constructors
| PTBool | |
| PTUInt | |
| PTNInt | |
| PTInt | |
| PTHalf | |
| PTFloat | |
| PTDouble | |
| PTBytes | |
| PTText | |
| PTAny | |
| PTNil | |
| PTUndefined |
Instances
| Generic PTerm Source # | |||||
Defined in Codec.CBOR.Cuddle.CDDL.CTree Associated Types
| |||||
| Show PTerm Source # | |||||
| Eq PTerm Source # | |||||
| Ord PTerm Source # | |||||
| Hashable PTerm Source # | |||||
Defined in Codec.CBOR.Cuddle.CDDL.CTree | |||||
| type Rep PTerm Source # | |||||
Defined in Codec.CBOR.Cuddle.CDDL.CTree type Rep PTerm = D1 ('MetaData "PTerm" "Codec.CBOR.Cuddle.CDDL.CTree" "cuddle-1.1.0.0-FBfXbuYjcH55Ev8TDYHISa" 'False) (((C1 ('MetaCons "PTBool" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PTUInt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PTNInt" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "PTInt" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PTHalf" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PTFloat" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "PTDouble" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PTBytes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PTText" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "PTAny" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PTNil" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PTUndefined" 'PrefixI 'False) (U1 :: Type -> Type))))) | |||||