isobmff-builder-0.11.3.0: A (bytestring-) builder for the ISO-14496-12 base media file format

Safe HaskellNone
LanguageHaskell2010

Data.Kind.Extra

Description

Kind-level utilities to guide and simplify programming at the type level

Synopsis

Documentation

data A :: forall foo. foo -> Type where Source #

A symbolic type, i.e. a wrapper around a (poly kinded) type to be produced by Eval instances.

All data types, e.g. data Point2 x y :: Type can be made into /symbolic representations of other types, by adding a symbolic/ type parameter: data Point2 x y :: A Vec2 -> Type.

Complete example:

data PrettyPrinter c where
  RenderText :: Symbol -> PrettyPrinter Symbol
  WithColor :: Color -> PrettyPrinter c -> PrettyPrinter c

data Color = Black | White

data ColoredText :: Color -> Symbol -> IsA (PrettyPrinter Symbol)

type instance Eval (ColoredText c txt) = 'WithColor c ('RenderText txt)

Constructors

MkA :: A foo 

Instances

BitStringBuilderHoley (Proxy (A Type (BitRecordField Bool * Bool 1 MkFieldFlag) -> Type) (MkField Bool * Bool 1 MkFieldFlag)) a Source # 
BitStringBuilderHoley (Proxy (A Type (BitRecordField Int8 * SignedNat 8 MkFieldI8) -> Type) (MkField Int8 * SignedNat 8 MkFieldI8)) a Source # 
BitStringBuilderHoley (Proxy (A Type (BitRecordField Int16 * SignedNat 16 MkFieldI16) -> Type) (MkField Int16 * SignedNat 16 MkFieldI16)) a Source # 
BitStringBuilderHoley (Proxy (A Type (BitRecordField Int32 * SignedNat 32 MkFieldI32) -> Type) (MkField Int32 * SignedNat 32 MkFieldI32)) a Source # 
BitStringBuilderHoley (Proxy (A Type (BitRecordField Int64 * SignedNat 64 MkFieldI64) -> Type) (MkField Int64 * SignedNat 64 MkFieldI64)) a Source # 
BitStringBuilderHoley (Proxy (A Type (BitRecordField Word8 * Nat 8 MkFieldU8) -> Type) (MkField Word8 * Nat 8 MkFieldU8)) a Source # 
BitStringBuilderHoley (Proxy (A Type (BitRecordField Word16 * Nat 16 MkFieldU16) -> Type) (MkField Word16 * Nat 16 MkFieldU16)) a Source # 
BitStringBuilderHoley (Proxy (A Type (BitRecordField Word32 * Nat 32 MkFieldU32) -> Type) (MkField Word32 * Nat 32 MkFieldU32)) a Source # 
BitStringBuilderHoley (Proxy (A Type (BitRecordField Word64 * Nat 64 MkFieldU64) -> Type) (MkField Word64 * Nat 64 MkFieldU64)) a Source # 
(KnownNat v, BitStringBuilderHoley (Proxy (IsA Type (BitRecordField rt * SignedNat size t)) f) a, (~) * (ToBitStringBuilder (Proxy (IsA Type (BitRecordField rt * SignedNat size t)) f) a) (x -> a), Num x) => BitStringBuilderHoley (Proxy (A Type (BitRecordField rt * SignedNat size t) -> Type) ((:=) rt size SignedNat t f (NegativeNat v))) a Source # 

Associated Types

type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * SignedNat size t) -> Type) ((:=) rt size SignedNat t f (NegativeNat v))) a :: * Source #

(KnownNat v, BitStringBuilderHoley (Proxy (IsA Type (BitRecordField rt * SignedNat size t)) f) a, (~) * (ToBitStringBuilder (Proxy (IsA Type (BitRecordField rt * SignedNat size t)) f) a) (x -> a), Num x) => BitStringBuilderHoley (Proxy (A Type (BitRecordField rt * SignedNat size t) -> Type) ((:=) rt size SignedNat t f (PositiveNat v))) a Source # 

Associated Types

type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * SignedNat size t) -> Type) ((:=) rt size SignedNat t f (PositiveNat v))) a :: * Source #

(KnownNat v, BitStringBuilderHoley (Proxy (IsA Type (BitRecordField rt * Nat len t)) f) a, (~) * (ToBitStringBuilder (Proxy (IsA Type (BitRecordField rt * Nat len t)) f) a) (rt -> a), Num rt) => BitStringBuilderHoley (Proxy (A Type (BitRecordField rt * Nat len t) -> Type) ((:=) rt len Nat t f v)) a Source # 

Associated Types

type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Nat len t) -> Type) ((:=) rt len Nat t f v)) a :: * Source #

Methods

bitStringBuilderHoley :: Proxy (A Type (BitRecordField rt * Nat len t) -> Type) ((rt := len) Nat t f v) -> Holey BitStringBuilder a (ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Nat len t) -> Type) ((rt := len) Nat t f v)) a) Source #

(~) Nat (BitRecordFieldSize rt * Bool size t f) 1 => BitStringBuilderHoley (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((:=) rt size Bool t f False)) a Source # 

Associated Types

type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((:=) rt size Bool t f False)) a :: * Source #

Methods

bitStringBuilderHoley :: Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((rt := size) Bool t f False) -> Holey BitStringBuilder a (ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((rt := size) Bool t f False)) a) Source #

(~) Nat (BitRecordFieldSize rt * Bool size t f) 1 => BitStringBuilderHoley (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((:=) rt size Bool t f True)) a Source # 

Associated Types

type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((:=) rt size Bool t f True)) a :: * Source #

Methods

bitStringBuilderHoley :: Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((rt := size) Bool t f True) -> Holey BitStringBuilder a (ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((rt := size) Bool t f True)) a) Source #

BitStringBuilderHoley (Proxy (IsA Type (BitRecordField rt k st len t)) nested) a => BitStringBuilderHoley (Proxy (A Type (BitRecordField rt k st len t) -> Type) (LabelF rt k st len t l nested)) a Source # 

Associated Types

type ToBitStringBuilder (Proxy (A Type (BitRecordField rt k st len t) -> Type) (LabelF rt k st len t l nested)) a :: * Source #

Methods

bitStringBuilderHoley :: Proxy (A Type (BitRecordField rt k st len t) -> Type) (LabelF rt k st len t l nested) -> Holey BitStringBuilder a (ToBitStringBuilder (Proxy (A Type (BitRecordField rt k st len t) -> Type) (LabelF rt k st len t l nested)) a) Source #

KnownChunkSize s => BitStringBuilderHoley (Proxy (A Type (BitRecordField (B s) * Nat s (MkFieldBits s)) -> Type) (MkField (B s) * Nat s (MkFieldBits s))) a Source # 
KnownChunkSize size => BitStringBuilderHoley (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) (MkField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size))) r Source # 

Associated Types

type ToBitStringBuilder (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) (MkField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size))) r :: * Source #

(KnownNat (FromEnum e v), KnownChunkSize size) => BitStringBuilderHoley (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) ((:=) (EnumValue e) size e (MkFieldCustom * (EnumValue e) e size) f v)) r Source # 

Associated Types

type ToBitStringBuilder (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) ((:=) (EnumValue e) size e (MkFieldCustom * (EnumValue e) e size) f v)) r :: * Source #

Methods

bitStringBuilderHoley :: Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) ((EnumValue e := size) e (MkFieldCustom * (EnumValue e) e size) f v) -> Holey BitStringBuilder r (ToBitStringBuilder (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) ((EnumValue e := size) e (MkFieldCustom * (EnumValue e) e size) f v)) r) Source #

BitStringBuilderHoley (Proxy BitRecord (Eval BitRecord r)) a => BitStringBuilderHoley (Proxy (IsA * BitRecord) r) a Source # 
type ($~) foo (IsA k b) (Fun1 k b foo f) x Source # 
type ($~) foo (IsA k b) (Fun1 k b foo f) x = f x
type ($~) foo (IsA * ((:->) Type * a (IsA k b))) (Fun2 k b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA k b))) (Fun2 k b a foo f) x = Fun1 k b a (f x)
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA k c))))) (Fun3 k c b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA k c))))) (Fun3 k c b a foo f) x = Fun2 k c b a (f x)
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA * ((:->) Type * c (IsAn k d))))))) (Fun4 k d c b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA * ((:->) Type * c (IsAn k d))))))) (Fun4 k d c b a foo f) x = Fun3 k d c b a (f x)
type ($~) foo (IsA * o) ((:>>>^:) * o * foo * bar f g) x Source # 
type ($~) foo (IsA * o) ((:>>>^:) * o * foo * bar f g) x = Return o (($~) bar o g (($~) foo bar f x))
type Eval BitRecord (MaybeField rt k st len t (Nothing (IsA Type (BitRecordField rt k st len t)))) Source # 
type Eval BitRecord (MaybeField rt k st len t (Nothing (IsA Type (BitRecordField rt k st len t)))) = EmptyBitRecord
type Eval BitRecord (MaybeField rt k st len t (Just (IsA Type (BitRecordField rt k st len t)) fld)) Source # 
type Eval BitRecord (MaybeField rt k st len t (Just (IsA Type (BitRecordField rt k st len t)) fld)) = BitRecordMember rt k st len t fld
type ($~) (Maybe s) (IsA k t) (Optional s k t fallback f) (Nothing s) Source # 
type ($~) (Maybe s) (IsA k t) (Optional s k t fallback f) (Nothing s) = fallback
type ($~) (Maybe foo) (IsA k t) (Optional foo k t fallback f) (Just foo s) Source # 
type ($~) (Maybe foo) (IsA k t) (Optional foo k t fallback f) (Just foo s) = ($~) foo (IsA k t) f s
type ToPretty (IsA Type (BitRecordField rt Type st size t)) f # 
type ToPretty (IsA Type (BitRecordField rt Type st size t)) f = PrettyField rt st size t f
type ToBitStringBuilder (Proxy (A Type (BitRecordField Bool * Bool 1 MkFieldFlag) -> Type) (MkField Bool * Bool 1 MkFieldFlag)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField Int8 * SignedNat 8 MkFieldI8) -> Type) (MkField Int8 * SignedNat 8 MkFieldI8)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField Int16 * SignedNat 16 MkFieldI16) -> Type) (MkField Int16 * SignedNat 16 MkFieldI16)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField Int32 * SignedNat 32 MkFieldI32) -> Type) (MkField Int32 * SignedNat 32 MkFieldI32)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField Int64 * SignedNat 64 MkFieldI64) -> Type) (MkField Int64 * SignedNat 64 MkFieldI64)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField Word8 * Nat 8 MkFieldU8) -> Type) (MkField Word8 * Nat 8 MkFieldU8)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField Word16 * Nat 16 MkFieldU16) -> Type) (MkField Word16 * Nat 16 MkFieldU16)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField Word32 * Nat 32 MkFieldU32) -> Type) (MkField Word32 * Nat 32 MkFieldU32)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField Word64 * Nat 64 MkFieldU64) -> Type) (MkField Word64 * Nat 64 MkFieldU64)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * SignedNat size t) -> Type) ((:=) rt size SignedNat t f (NegativeNat v))) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * SignedNat size t) -> Type) ((:=) rt size SignedNat t f (NegativeNat v))) a = a
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * SignedNat size t) -> Type) ((:=) rt size SignedNat t f (PositiveNat v))) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * SignedNat size t) -> Type) ((:=) rt size SignedNat t f (PositiveNat v))) a = a
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Nat len t) -> Type) ((:=) rt len Nat t f v)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Nat len t) -> Type) ((:=) rt len Nat t f v)) a = a
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((:=) rt size Bool t f False)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((:=) rt size Bool t f False)) a = a
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((:=) rt size Bool t f True)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt * Bool size t) -> Type) ((:=) rt size Bool t f True)) a = a
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt k st len t) -> Type) (LabelF rt k st len t l nested)) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField rt k st len t) -> Type) (LabelF rt k st len t l nested)) a = ToBitStringBuilder (Proxy (IsA Type (BitRecordField rt k st len t)) nested) a
type ToBitStringBuilder (Proxy (A Type (BitRecordField (B s) * Nat s (MkFieldBits s)) -> Type) (MkField (B s) * Nat s (MkFieldBits s))) a Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField (B s) * Nat s (MkFieldBits s)) -> Type) (MkField (B s) * Nat s (MkFieldBits s))) a = B s -> a
type ToBitStringBuilder (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) (MkField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size))) r Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) (MkField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size))) r = EnumValue e -> r
type ToBitStringBuilder (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) ((:=) (EnumValue e) size e (MkFieldCustom * (EnumValue e) e size) f v)) r Source # 
type ToBitStringBuilder (Proxy (A Type (BitRecordField (EnumValue e) * e size (MkFieldCustom * (EnumValue e) e size)) -> Type) ((:=) (EnumValue e) size e (MkFieldCustom * (EnumValue e) e size) f v)) r = r
type ToBitStringBuilder (Proxy (IsA * BitRecord) r) a Source # 
type ($~) (IsA * foo) foo (Extract * foo) x Source # 
type ($~) (IsA * foo) foo (Extract * foo) x = Eval foo x
type ($~) (IsA * foo) bar1 ((:^>>>:) * bar1 * foo * bar f g) x Source # 
type ($~) (IsA * foo) bar1 ((:^>>>:) * bar1 * foo * bar f g) x = ($~) bar bar1 g (($~) foo bar f (Eval foo x))
type ($~) (IsA * foo) (IsA * o) ((:^>>>^:) * o * foo * bar f g) x Source # 
type ($~) (IsA * foo) (IsA * o) ((:^>>>^:) * o * foo * bar f g) x = Return o (($~) bar o g (($~) foo bar f (Eval foo x)))
type SizeFieldValue (A Type (BitRecordField rt k st size t) -> Type) (MkField rt k st size t) Source # 
type SizeFieldValue (A Type (BitRecordField rt k st size t) -> Type) (MkField rt k st size t) = size
type SizeFieldValue (A Type (BitRecordField rt * k size t) -> Type) ((:=) rt size k t f v) Source # 
type SizeFieldValue (A Type (BitRecordField rt * k size t) -> Type) ((:=) rt size k t f v) = SizeFieldValue k v
type SizeFieldValue (A Type (BitRecordField rt k st len t) -> Type) (LabelF rt k st len t l f) Source # 
type SizeFieldValue (A Type (BitRecordField rt k st len t) -> Type) (LabelF rt k st len t l f) = SizeFieldValue (IsA Type (BitRecordField rt k st len t)) f

type IsA foo = (A foo -> Type :: Type) Source #

Type alias for A such that data Point2 x y :: A Vec2 -> Type becomes data Point2 x y :: IsA Vec2

type IsAn oo = (IsA oo :: Type) Source #

An alias to IsA

type Return f = Pure f Source #

data Pure f :: IsAn o Source #

A type foo, IsA foo.

Instances

type Eval foo (Pure foo f) Source # 
type Eval foo (Pure foo f) = f

type family Eval (t :: A foo -> Type) :: foo Source #

An open type family to turn symbolic type representations created with A or IsA into the actual types.

Instances

type Eval BitRecord (OptionalRecord (Nothing BitRecord)) Source # 
type Eval BitRecord (OptionalRecord (Just BitRecord t)) Source # 
type Eval BitRecord (StaticExpandableContent record) Source # 
type Eval foo (Pure foo f) Source # 
type Eval foo (Pure foo f) = f
type Eval BitRecord (RecArray r n) Source # 
type Eval BitRecord ((:^+) l r) Source # 
type Eval BitRecord ((:+^) l r) Source # 
type Eval BitRecord (BitRecordOfList foo f xs) Source # 
type Eval AudioSubConfig (GASpecificConfig fl cd ext) Source # 
type Eval AudioSubConfig (GASpecificConfig fl cd ext) = TypeError AudioSubConfig (Text "AudioSubConfig is abstract!")
type Eval BitRecord (Sized rt len t1 sf r) Source # 
type Eval BitRecord (Sized rt len t1 sf r) = (.+:) rt * Nat len t1 ((:=) rt len Nat t1 ((@:) rt * Nat len t1 "size" sf) (SizeFieldValue BitRecord r)) r
type Eval foo1 ((:>>=:) * foo1 * foo x f) Source # 
type Eval foo1 ((:>>=:) * foo1 * foo x f) = Eval foo1 (($~) foo (IsA * foo1) f (Eval foo x))
type Eval BitRecord (RecordField rt k st len t f) Source # 
type Eval BitRecord (RecordField rt k st len t f) = BitRecordMember rt k st len t f
type Eval BitRecord (MaybeField rt k st len t (Nothing (IsA Type (BitRecordField rt k st len t)))) Source # 
type Eval BitRecord (MaybeField rt k st len t (Nothing (IsA Type (BitRecordField rt k st len t)))) = EmptyBitRecord
type Eval BitRecord (MaybeField rt k st len t (Just (IsA Type (BitRecordField rt k st len t)) fld)) Source # 
type Eval BitRecord (MaybeField rt k st len t (Just (IsA Type (BitRecordField rt k st len t)) fld)) = BitRecordMember rt k st len t fld
type Eval BitRecord (SizedField rt k st len t2 rt1 len1 t1 sf r) Source # 
type Eval BitRecord (SizedField rt k st len t2 rt1 len1 t1 sf r) = (.+.) rt k st len t2 rt1 * Nat len1 t1 ((:=) rt1 len1 Nat t1 ((@:) rt1 * Nat len1 t1 "size" sf) (SizeFieldValue (IsA Type (BitRecordField rt k st len t2)) r)) r
type Eval (EnumOf enum) (EnumParamAlt enum size label (FixedEnum enum size)) Source # 
type Eval (EnumOf enum) (EnumParamAlt enum size label (FixedEnum enum size)) = TypeError (EnumOf enum) ((:<>:) (Text "Cannot assign an extension value to the FixedEnum ") (ShowType Type enum))
type Eval (EnumOf enum) (EnumParamAlt enum size label (ExtEnum rt k st len t enum size extInd extField)) Source # 
type Eval (EnumOf enum) (EnumParamAlt enum size label (ExtEnum rt k st len t enum size extInd extField)) = MkEnumOf enum size label (ExtEnum rt k st len t enum size extInd extField) (StaticFieldValue enum label extInd) (BitRecordMember rt k st len t ((:~) label rt k st len t extField (RuntimeFieldValue k st label)))
type Eval (EnumOf enum) (EnumParam enum size label ei) Source # 
type Eval (EnumOf enum) (EnumParam enum size label ei) = MkEnumOf enum size label ei (RuntimeFieldValue Type enum label) EmptyBitRecord
type Eval (EnumOf enum) (SetEnum enum size l ei value) Source # 
type Eval (EnumOf enum) (SetEnum enum size l ei value) = MkEnumOf enum size l ei (StaticFieldValue enum l value) EmptyBitRecord
type Eval (EnumOf enum) (SetEnumAlt k enum size l (FixedEnum enum size) value) Source # 
type Eval (EnumOf enum) (SetEnumAlt k enum size l (FixedEnum enum size) value) = TypeError (EnumOf enum) ((:<>:) (Text "Cannot assign an 'extended' value to the 'FixedEnum' ") (ShowType Type enum))
type Eval (EnumOf enum) (SetEnumAlt st enum size l (ExtEnum rt * st len t enum size extInd extField) value) Source # 
type Eval (EnumOf enum) (SetEnumAlt st enum size l (ExtEnum rt * st len t enum size extInd extField) value) = MkEnumOf enum size l (ExtEnum rt * st len t enum size extInd extField) (StaticFieldValue enum l extInd) (BitRecordMember rt * st len t ((:=) rt len st t extField value))
type Eval (Descriptor 6 SLConfigDescr) Mp4SyncLayerDescriptor Source # 
type Eval (Descriptor 20 ProfileLevelIndicationIndexDescr) (ProfileLevelIndicationIndexDescriptor val) Source # 
type Eval (Descriptor 4 DecoderConfigDescr) (DecoderConfigDescriptor ot st di ps) Source # 
type Eval (DecoderSpecificInfo AudioIso14496_3 AudioStream) (AudioConfigAacMinimal aoId subCfg freq channels) Source # 
type Eval (DecoderSpecificInfo AudioIso14496_3 AudioStream) (AudioConfigSbrExplicitHierachical aoId subCfg freq channels extFreq) Source # 
type Eval (Descriptor 3 ES_Descr) (ESDescriptor len esId depEsId url ocrEsId streamPrio decConfig slConfig) Source # 
type Eval (Descriptor 3 ES_Descr) (ESDescriptor len esId depEsId url ocrEsId streamPrio decConfig slConfig) = MkDescriptor 3 ES_Descr ((:+:) ((:+:) ((:+:) ((:+:) ((.+:) Word16 * Nat 16 MkFieldU16 ((:~) "esId" Word16 * Nat 16 MkFieldU16 ((@:) Word16 * Nat 16 MkFieldU16 "esId" FieldU16) esId) ((.+:) Bool * Bool 1 MkFieldFlag ((@:) Bool * Bool 1 MkFieldFlag "depEsIdFlag" (FlagJust (IsA Type (FieldValue * "depEsId" Nat)) depEsId)) ((.+:) Bool * Bool 1 MkFieldFlag ((@:) Bool * Bool 1 MkFieldFlag "urlFlag" (FlagJust (IsA Type (BitRecordField ASizedString * ASizedString len (MkFieldCustom * ASizedString ASizedString len))) url)) ((.+:) Bool * Bool 1 MkFieldFlag ((@:) Bool * Bool 1 MkFieldFlag "ocrEsIdFlag" (FlagJust (IsA Type (FieldValue * "ocrEsId" Nat)) ocrEsId)) ((.+:) (B 5) * Nat 5 (MkFieldBits 5) ((:~) "streamPrio" (B 5) * Nat 5 (MkFieldBits 5) ((@:) (B 5) * Nat 5 (MkFieldBits 5) "streamPriority" (Field 5)) streamPrio) ((:+?) "depEsId" Word16 * Nat 16 MkFieldU16 ((@:) Word16 * Nat 16 MkFieldU16 "depEsId" FieldU16) depEsId)))))) (Eval BitRecord (OptionalRecordOf (IsA Type (BitRecordField ASizedString * ASizedString len (MkFieldCustom * ASizedString ASizedString len))) (Fun1 * BitRecord (IsA Type (BitRecordField ASizedString * ASizedString len (MkFieldCustom * ASizedString ASizedString len))) (RecordField ASizedString * ASizedString len (MkFieldCustom * ASizedString ASizedString len))) url))) ((:+?) "ocrEsId" Word16 * Nat 16 MkFieldU16 ((@:) Word16 * Nat 16 MkFieldU16 "ocrEsId" FieldU16) ocrEsId)) (($~) (Descriptor 4 DecoderConfigDescr) BitRecord (BitRecordOfDescriptor 4 DecoderConfigDescr) (Eval (Descriptor 4 DecoderConfigDescr) decConfig))) (($~) (Descriptor 6 SLConfigDescr) BitRecord (BitRecordOfDescriptor 6 SLConfigDescr) (Eval (Descriptor 6 SLConfigDescr) slConfig)))

data foo :-> bar Source #

A symbolic type-level function.

Instances

type ($~) foo (IsA * ((:->) Type * a (IsA k b))) (Fun2 k b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA k b))) (Fun2 k b a foo f) x = Fun1 k b a (f x)
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA k c))))) (Fun3 k c b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA k c))))) (Fun3 k c b a foo f) x = Fun2 k c b a (f x)
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA * ((:->) Type * c (IsAn k d))))))) (Fun4 k d c b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA * ((:->) Type * c (IsAn k d))))))) (Fun4 k d c b a foo f) x = Fun3 k d c b a (f x)

data Id :: IsA (foo :-> foo) Source #

Identity

Instances

type ($~) bar bar (Id * bar) x Source # 
type ($~) bar bar (Id * bar) x = x

type Apply f x = f $~ x Source #

An alias for $~

type (^*^) f x = f $~ Eval x infixl 0 Source #

Symbolic function application

type family (f :: IsA (foo :-> bar)) $~ (x :: foo) :: bar infixl 0 Source #

An open family of functions from foo to bar

Instances

type ($~) BitRecord BitRecord (BitRecordAppendFun_ l) r Source # 
type ($~) bar bar (Id * bar) x Source # 
type ($~) bar bar (Id * bar) x = x
type ($~) foo bar1 ((:>>>:) * bar1 * foo * bar f g) x Source # 
type ($~) foo bar1 ((:>>>:) * bar1 * foo * bar f g) x = ($~) bar bar1 g (($~) foo bar f x)
type ($~) foo (IsA k b) (Fun1 k b foo f) x Source # 
type ($~) foo (IsA k b) (Fun1 k b foo f) x = f x
type ($~) foo (IsA * ((:->) Type * a (IsA k b))) (Fun2 k b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA k b))) (Fun2 k b a foo f) x = Fun1 k b a (f x)
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA k c))))) (Fun3 k c b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA k c))))) (Fun3 k c b a foo f) x = Fun2 k c b a (f x)
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA * ((:->) Type * c (IsAn k d))))))) (Fun4 k d c b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA * ((:->) Type * c (IsAn k d))))))) (Fun4 k d c b a foo f) x = Fun3 k d c b a (f x)
type ($~) foo (IsA * o) ((:>>>^:) * o * foo * bar f g) x Source # 
type ($~) foo (IsA * o) ((:>>>^:) * o * foo * bar f g) x = Return o (($~) bar o g (($~) foo bar f x))
type ($~) (Maybe s) (IsA k t) (Optional s k t fallback f) (Nothing s) Source # 
type ($~) (Maybe s) (IsA k t) (Optional s k t fallback f) (Nothing s) = fallback
type ($~) (Maybe foo) (IsA k t) (Optional foo k t fallback f) (Just foo s) Source # 
type ($~) (Maybe foo) (IsA k t) (Optional foo k t fallback f) (Just foo s) = ($~) foo (IsA k t) f s
type ($~) (IsA * foo) foo (Extract * foo) x Source # 
type ($~) (IsA * foo) foo (Extract * foo) x = Eval foo x
type ($~) (Descriptor tagInd tag) BitRecord (BitRecordOfDescriptor tagInd tag) (MkDescriptor tagInd tag body) Source # 
type ($~) (IsA * foo) bar1 ((:^>>>:) * bar1 * foo * bar f g) x Source # 
type ($~) (IsA * foo) bar1 ((:^>>>:) * bar1 * foo * bar f g) x = ($~) bar bar1 g (($~) foo bar f (Eval foo x))
type ($~) (DecoderSpecificInfo ot st) (Descriptor 5 DecSpecificInfo) (DescriptorOfDecoderSpecificInfo ot st) (MkDecoderSpecificInfo ot st body) Source # 
type ($~) (IsA * foo) (IsA * o) ((:^>>>^:) * o * foo * bar f g) x Source # 
type ($~) (IsA * foo) (IsA * o) ((:^>>>^:) * o * foo * bar f g) x = Return o (($~) bar o g (($~) foo bar f (Eval foo x)))

data (:>>=:) :: IsA foo -> IsA (foo :-> IsA bar) -> IsA bar infixl 1 Source #

Eval and ApplyCompose functions

Instances

type Eval foo1 ((:>>=:) * foo1 * foo x f) Source # 
type Eval foo1 ((:>>=:) * foo1 * foo x f) = Eval foo1 (($~) foo (IsA * foo1) f (Eval foo x))

data (:>>>:) :: IsA (good :-> better) -> IsA (better :-> best) -> IsA (good :-> best) infixl 1 Source #

Compose functions

Instances

type ($~) foo bar1 ((:>>>:) * bar1 * foo * bar f g) x Source # 
type ($~) foo bar1 ((:>>>:) * bar1 * foo * bar f g) x = ($~) bar bar1 g (($~) foo bar f x)

data (:^>>>:) :: IsA (good :-> better) -> IsA (better :-> best) -> IsA (IsA good :-> best) infixl 1 Source #

Eval Input & Compose

Instances

type ($~) (IsA * foo) bar1 ((:^>>>:) * bar1 * foo * bar f g) x Source # 
type ($~) (IsA * foo) bar1 ((:^>>>:) * bar1 * foo * bar f g) x = ($~) bar bar1 g (($~) foo bar f (Eval foo x))

data (:>>>^:) :: IsA (good :-> better) -> IsA (better :-> best) -> IsA (good :-> IsA best) infixl 1 Source #

Compose and Return

Instances

type ($~) foo (IsA * o) ((:>>>^:) * o * foo * bar f g) x Source # 
type ($~) foo (IsA * o) ((:>>>^:) * o * foo * bar f g) x = Return o (($~) bar o g (($~) foo bar f x))

data (:^>>>^:) :: IsA (good :-> better) -> IsA (better :-> best) -> IsA (IsA good :-> IsA best) infixl 1 Source #

Eval compose and return

Instances

type ($~) (IsA * foo) (IsA * o) ((:^>>>^:) * o * foo * bar f g) x Source # 
type ($~) (IsA * foo) (IsA * o) ((:^>>>^:) * o * foo * bar f g) x = Return o (($~) bar o g (($~) foo bar f (Eval foo x)))

data Extract :: IsA (IsA x :-> x) Source #

A function that applies Eval

Instances

type ($~) (IsA * foo) foo (Extract * foo) x Source # 
type ($~) (IsA * foo) foo (Extract * foo) x = Eval foo x

data Optional :: IsA t -> IsA (s :-> IsA t) -> IsA (Maybe s :-> IsA t) Source #

Either use the value from Just or return a fallback value(types(kinds))

Instances

type ($~) (Maybe s) (IsA k t) (Optional s k t fallback f) (Nothing s) Source # 
type ($~) (Maybe s) (IsA k t) (Optional s k t fallback f) (Nothing s) = fallback
type ($~) (Maybe foo) (IsA k t) (Optional foo k t fallback f) (Just foo s) Source # 
type ($~) (Maybe foo) (IsA k t) (Optional foo k t fallback f) (Just foo s) = ($~) foo (IsA k t) f s

type family FoldMap (append :: IsA (bar :-> IsA (bar :-> bar))) (zero :: bar) (f :: IsA (foo :-> bar)) (xs :: [(foo :: Type)]) :: (bar :: Type) where ... Source #

Map over the elements of a list and fold the result.

Equations

FoldMap append zero f '[] = zero 
FoldMap append zero f (x ': xs) = (append $~ (f $~ x)) $~ FoldMap append zero f xs 

data Fun1 :: (a -> IsA b) -> IsA (a :-> IsA b) Source #

Like TyCon1 from Data.Singletons

Instances

type ($~) foo (IsA k b) (Fun1 k b foo f) x Source # 
type ($~) foo (IsA k b) (Fun1 k b foo f) x = f x

data Fun2 :: (a -> b -> IsA c) -> IsA (a :-> IsA (b :-> IsA c)) Source #

Instances

type ($~) foo (IsA * ((:->) Type * a (IsA k b))) (Fun2 k b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA k b))) (Fun2 k b a foo f) x = Fun1 k b a (f x)

data Fun3 :: (a -> b -> c -> IsA d) -> IsA (a :-> IsA (b :-> IsA (c :-> IsA d))) Source #

Instances

type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA k c))))) (Fun3 k c b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA k c))))) (Fun3 k c b a foo f) x = Fun2 k c b a (f x)

data Fun4 :: (a -> b -> c -> d -> IsAn e) -> IsA (a :-> IsA (b :-> IsA (c :-> IsA (d :-> IsAn e)))) Source #

Instances

type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA * ((:->) Type * c (IsAn k d))))))) (Fun4 k d c b a foo f) x Source # 
type ($~) foo (IsA * ((:->) Type * a (IsA * ((:->) Type * b (IsA * ((:->) Type * c (IsAn k d))))))) (Fun4 k d c b a foo f) x = Fun3 k d c b a (f x)