isobmff-0.13.0.0: A parser and generator for the ISO-14496-12/14 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 group of types that all Eval into the same type. This is an open and extensible alternative to defining an algebraic data type and using the promoted constructors. A goes hand-in-hand with IsA for better readability.

For 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 (MkField MkFieldFlag)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldFlag)) a :: Type Source #

BitStringBuilderHoley (Proxy (MkField MkFieldI8)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldI8)) a :: Type Source #

BitStringBuilderHoley (Proxy (MkField MkFieldI16)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldI16)) a :: Type Source #

BitStringBuilderHoley (Proxy (MkField MkFieldI32)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldI32)) a :: Type Source #

BitStringBuilderHoley (Proxy (MkField MkFieldI64)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldI64)) a :: Type Source #

BitStringBuilderHoley (Proxy (MkField MkFieldU8)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldU8)) a :: Type Source #

BitStringBuilderHoley (Proxy (MkField MkFieldU16)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldU16)) a :: Type Source #

BitStringBuilderHoley (Proxy (MkField MkFieldU32)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldU32)) a :: Type Source #

BitStringBuilderHoley (Proxy (MkField MkFieldU64)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldU64)) a :: Type Source #

(KnownNat v, BitStringBuilderHoley (Proxy f) a, ToBitStringBuilder (Proxy f) a ~ (rt -> a), Num rt) => BitStringBuilderHoley (Proxy (f := v)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (f := v)) a :: Type Source #

(KnownNat v, BitStringBuilderHoley (Proxy f) a, ToBitStringBuilder (Proxy f) a ~ (x -> a), Num x) => BitStringBuilderHoley (Proxy (f := NegativeNat v)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (f := NegativeNat v)) a :: Type Source #

(KnownNat v, BitStringBuilderHoley (Proxy f) a, ToBitStringBuilder (Proxy f) a ~ (x -> a), Num x) => BitStringBuilderHoley (Proxy (f := PositiveNat v)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (f := PositiveNat v)) a :: Type Source #

BitRecordFieldSize f ~ 1 => BitStringBuilderHoley (Proxy (f := False)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (f := False)) a :: Type Source #

BitRecordFieldSize f ~ 1 => BitStringBuilderHoley (Proxy (f := True)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (f := True)) a :: Type Source #

BitStringBuilderHoley (Proxy nested) a => BitStringBuilderHoley (Proxy (LabelF l nested)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (LabelF l nested)) a :: Type Source #

KnownChunkSize s => BitStringBuilderHoley (Proxy (MkField (MkFieldBits :: BitField (B s) Nat s))) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldBits)) a :: Type Source #

KnownChunkSize size => BitStringBuilderHoley (Proxy (MkField (MkFieldCustom :: BitField (EnumValue e) e size))) r Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

Associated Types

type ToBitStringBuilder (Proxy (MkField MkFieldCustom)) r :: Type Source #

(KnownNat (FromEnum e v), KnownChunkSize size) => BitStringBuilderHoley (Proxy (f := v)) r Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

Associated Types

type ToBitStringBuilder (Proxy (f := v)) r :: Type Source #

BitStringBuilderHoley (Proxy (Eval r)) a => BitStringBuilderHoley (Proxy r) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

Associated Types

type ToBitStringBuilder (Proxy r) a :: Type Source #

type (Extract :: A (IsA foo :-> foo) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Extract :: A (IsA foo :-> foo) -> Type) $~ (x :: IsA foo) = Eval x
type (f :^>>>: g :: A (IsA foo :-> bar2) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :^>>>: g :: A (IsA foo :-> bar2) -> Type) $~ (x :: IsA foo) = g $~ (f $~ Eval x)
type Eval (MaybeField (Nothing :: Maybe (IsA (BitRecordField t))) :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (MaybeField (Just fld) :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type ToPretty (f :: IsA (BitRecordField t)) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type ToBitStringBuilder (Proxy (MkField MkFieldFlag)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField MkFieldI8)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField MkFieldI16)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField MkFieldI32)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField MkFieldI64)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField MkFieldU8)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField MkFieldU16)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField MkFieldU32)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField MkFieldU64)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (f := NegativeNat v)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (f := PositiveNat v)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (f := v)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (f := v)) a = a
type ToBitStringBuilder (Proxy (f := False)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (f := False)) a = a
type ToBitStringBuilder (Proxy (f := True)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (f := True)) a = a
type ToBitStringBuilder (Proxy (LabelF l nested)) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (LabelF l nested)) a = ToBitStringBuilder (Proxy nested) a
type ToBitStringBuilder (Proxy (MkField (MkFieldBits :: BitField (B s) Nat s))) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type ToBitStringBuilder (Proxy (MkField (MkFieldBits :: BitField (B s) Nat s))) a = B s -> a
type ToBitStringBuilder (Proxy (MkField (MkFieldCustom :: BitField (EnumValue e) e size))) r Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

type ToBitStringBuilder (Proxy (f := v)) r Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

type ToBitStringBuilder (Proxy (f := v)) r = r
type ToBitStringBuilder (Proxy r) a Source # 
Instance details

Defined in Data.Type.BitRecords.Builder.LazyByteStringBuilder

type (Fun1 f :: A (foo :-> IsA b) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

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

Defined in Data.Kind.Extra

type (Fun2 f :: A (foo :-> IsA (a :-> IsA b)) -> Type) $~ (x :: foo) = Fun1 (f x)
type (Fun3 f :: A (foo :-> IsA (a :-> IsA (b :-> IsA c))) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

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

Defined in Data.Kind.Extra

type (Fun4 f :: A (foo :-> IsA (a :-> IsA (b :-> IsA (c :-> IsAn d)))) -> Type) $~ (x :: foo) = Fun3 (f x)
type (f :>>>^: g :: A (foo :-> IsA o) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :>>>^: g :: A (foo :-> IsA o) -> Type) $~ (x :: foo) = Return (g $~ (f $~ x))
type (Optional fallback f :: A (Maybe s :-> IsA t) -> Type) $~ (Nothing :: Maybe s) Source # 
Instance details

Defined in Data.Kind.Extra

type (Optional fallback f :: A (Maybe s :-> IsA t) -> Type) $~ (Nothing :: Maybe s) = fallback
type (Optional fallback f :: A (Maybe foo :-> IsA t) -> Type) $~ (Just s :: Maybe foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Optional fallback f :: A (Maybe foo :-> IsA t) -> Type) $~ (Just s :: Maybe foo) = f $~ s
type (f :^>>>^: g :: A (IsA foo :-> IsA o) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :^>>>^: g :: A (IsA foo :-> IsA o) -> Type) $~ (x :: IsA foo) = Return (g $~ (f $~ Eval x))
type SizeFieldValue (MkField t :: A (BitRecordField t) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Sized

type SizeFieldValue (MkField t :: A (BitRecordField t) -> Type) = size
type SizeFieldValue (f := v :: A (BitRecordField t) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Sized

type SizeFieldValue (LabelF l f :: A (BitRecordField t) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Sized

type IsA (foo :: k) = (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 :: k) = (IsA oo :: Type) Source #

An alias to IsA

type Return f = Pure f Source #

data Pure (f :: o) :: IsAn o Source #

A type foo, IsA foo.

Instances
type Eval (Pure f :: A foo -> Type) Source # 
Instance details

Defined in Data.Kind.Extra

type Eval (Pure f :: A foo -> Type) = 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 (OptionalRecord (Nothing :: Maybe BitRecord)) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (OptionalRecord (Just t) :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (OptionalRecord (Just t) :: A BitRecord -> Type) = t
type Eval (StaticExpandableContent record :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.Expandable

type Eval (Pure f :: A foo -> Type) Source # 
Instance details

Defined in Data.Kind.Extra

type Eval (Pure f :: A foo -> Type) = f
type Eval (RecArray r n :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (l :^+ r :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (l :^+ r :: A BitRecord -> Type) = Append (Eval l) r
type Eval (l :+^ r :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (l :+^ r :: A BitRecord -> Type) = Append l (Eval r)
type Eval (BitRecordOfList f xs :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (GASpecificConfig fl cd ext :: A AudioSubConfig -> Type) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.AudioSpecificConfig

type Eval (GASpecificConfig fl cd ext :: A AudioSubConfig -> Type) = (TypeError (Text "AudioSubConfig is abstract!") :: AudioSubConfig)
type Eval (Sized sf r :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Sized

type Eval (Sized sf r :: A BitRecord -> Type) = (("size" @: sf) := SizeFieldValue r) .+: r
type Eval (x :>>=: f :: A foo2 -> Type) Source # 
Instance details

Defined in Data.Kind.Extra

type Eval (x :>>=: f :: A foo2 -> Type) = Eval (f $~ Eval x)
type Eval (RecordField f :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (MaybeField (Nothing :: Maybe (IsA (BitRecordField t))) :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (MaybeField (Just fld) :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type Eval (SizedField sf r :: A BitRecord -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Sized

type Eval (SizedField sf r :: A BitRecord -> Type) = (("size" @: sf) := SizeFieldValue r) .+. r
type Eval (EnumParam label ei :: A (EnumOf enum) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

type Eval (EnumParam label ei :: A (EnumOf enum) -> Type) = MkEnumOf ei (RuntimeFieldValue label :: A (FieldValue label enum) -> Type) EmptyBitRecord
type Eval (EnumParamAlt label (FixedEnum enum size) :: A (EnumOf enum) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

type Eval (EnumParamAlt label (FixedEnum enum size) :: A (EnumOf enum) -> Type) = (TypeError (Text "Cannot assign an extension value to the FixedEnum " :<>: ShowType enum) :: EnumOf enum)
type Eval (EnumParamAlt label (ExtEnum enum size extInd extField) :: A (EnumOf enum) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

type Eval (EnumParamAlt label (ExtEnum enum size extInd extField) :: A (EnumOf enum) -> Type) = MkEnumOf (ExtEnum enum size extInd extField) (StaticFieldValue label extInd) (BitRecordMember (extField :~ (RuntimeFieldValue label :: A (FieldValue label st) -> Type)))
type Eval (SetEnum l ei value :: A (EnumOf enum) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

type Eval (SetEnum l ei value :: A (EnumOf enum) -> Type) = MkEnumOf ei (StaticFieldValue l value) EmptyBitRecord
type Eval (SetEnumAlt l (FixedEnum enum size) value :: A (EnumOf enum) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

type Eval (SetEnumAlt l (FixedEnum enum size) value :: A (EnumOf enum) -> Type) = (TypeError (Text "Cannot assign an 'extended' value to the 'FixedEnum' " :<>: ShowType enum) :: EnumOf enum)
type Eval (SetEnumAlt l (ExtEnum enum size extInd extField) value :: A (EnumOf enum) -> Type) Source # 
Instance details

Defined in Data.Type.BitRecords.Enum

type Eval (SetEnumAlt l (ExtEnum enum size extInd extField) value :: A (EnumOf enum) -> Type) = MkEnumOf (ExtEnum enum size extInd extField) (StaticFieldValue l extInd) (BitRecordMember (extField := value))
type Eval Mp4SyncLayerDescriptor Source #

In the holy scripture, ISO-14496-14 section 3.1.2, it is written that there shall be restrictions on the elementary stream descriptor, in there it says: Thou shall use only two as the value for the predefined field in the blessed SLDescriptor. Not one, this is a value not big enough, nor three, this value is too much. The righteous one ever only uses two. Only a fool will use 256.

Instance details

Defined in Data.ByteString.Mp4.Boxes.SyncLayerConfigDescriptor

type Eval (ProfileLevelIndicationIndexDescriptor val :: A (Descriptor ProfileLevelIndicationIndexDescr) -> Type) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.DecoderConfigDescriptor

type Eval (DecoderConfigDescriptor ot st di ps :: A (Descriptor DecoderConfigDescr) -> Type) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.DecoderConfigDescriptor

type Eval (AudioConfigAacMinimal aoId subCfg freq channels :: A (DecoderSpecificInfo AudioIso14496_3 AudioStream) -> Type) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.AudioSpecificConfig

type Eval (AudioConfigSbrExplicitHierachical aoId subCfg freq channels extFreq :: A (DecoderSpecificInfo AudioIso14496_3 AudioStream) -> Type) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.AudioSpecificConfig

type Eval (ESDescriptor esId depEsId url ocrEsId streamPrio decConfig slConfig :: A (Descriptor ES_Descr) -> Type) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.ElementaryStreamDescriptor

type Eval (ESDescriptor esId depEsId url ocrEsId streamPrio decConfig slConfig :: A (Descriptor ES_Descr) -> Type) = (MkDescriptor ((((((("esId" @: FieldU16) :~ esId) .+: (("depEsIdFlag" @: FlagJust depEsId) .+: (("urlFlag" @: FlagJust url) .+: (("ocrEsIdFlag" @: FlagJust ocrEsId) .+: ((("streamPriority" @: Field 5) :~ streamPrio) .+: (("depEsId" @: FieldU16) :+? depEsId)))))) :+: Eval (OptionalRecordOf (Fun1 (RecordField :: IsA (BitRecordField (MkFieldCustom :: BitField ASizedString ASizedString len)) -> A BitRecord -> Type)) url)) :+: (("ocrEsId" @: FieldU16) :+? ocrEsId)) :+: ((BitRecordOfDescriptor :: A (Descriptor DecoderConfigDescr :-> BitRecord) -> Type) $~ Eval decConfig)) :+: ((BitRecordOfDescriptor :: A (Descriptor SLConfigDescr :-> BitRecord) -> Type) $~ Eval slConfig)) :: Descriptor ES_Descr)

data foo :-> bar Source #

A symbolic type-level function.

Instances
type (Fun2 f :: A (foo :-> IsA (a :-> IsA b)) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Fun2 f :: A (foo :-> IsA (a :-> IsA b)) -> Type) $~ (x :: foo) = Fun1 (f x)
type (Fun3 f :: A (foo :-> IsA (a :-> IsA (b :-> IsA c))) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

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

Defined in Data.Kind.Extra

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

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

Identity

Instances
type (Id :: A (bar :-> bar) -> Type) $~ (x :: bar) Source # 
Instance details

Defined in Data.Kind.Extra

type (Id :: A (bar :-> bar) -> Type) $~ (x :: bar) = x

type Apply f x = f $~ x Source #

An alias for $~

type (^*^) (f :: IsA (foo :-> bar)) (x :: IsA foo) = 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 (BitRecordAppendFun_ l :: A (BitRecord :-> BitRecord) -> Type) $~ (r :: BitRecord) Source # 
Instance details

Defined in Data.Type.BitRecords.Core

type (Id :: A (bar :-> bar) -> Type) $~ (x :: bar) Source # 
Instance details

Defined in Data.Kind.Extra

type (Id :: A (bar :-> bar) -> Type) $~ (x :: bar) = x
type (f :>>>: g :: A (foo :-> bar2) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :>>>: g :: A (foo :-> bar2) -> Type) $~ (x :: foo) = g $~ (f $~ x)
type (Extract :: A (IsA foo :-> foo) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Extract :: A (IsA foo :-> foo) -> Type) $~ (x :: IsA foo) = Eval x
type (BitRecordOfDescriptor :: A (Descriptor tag :-> BitRecord) -> Type) $~ (MkDescriptor body :: Descriptor tag) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.BaseDescriptor

type (f :^>>>: g :: A (IsA foo :-> bar2) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :^>>>: g :: A (IsA foo :-> bar2) -> Type) $~ (x :: IsA foo) = g $~ (f $~ Eval x)
type (Fun1 f :: A (foo :-> IsA b) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

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

Defined in Data.Kind.Extra

type (Fun2 f :: A (foo :-> IsA (a :-> IsA b)) -> Type) $~ (x :: foo) = Fun1 (f x)
type (Fun3 f :: A (foo :-> IsA (a :-> IsA (b :-> IsA c))) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

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

Defined in Data.Kind.Extra

type (Fun4 f :: A (foo :-> IsA (a :-> IsA (b :-> IsA (c :-> IsAn d)))) -> Type) $~ (x :: foo) = Fun3 (f x)
type (f :>>>^: g :: A (foo :-> IsA o) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :>>>^: g :: A (foo :-> IsA o) -> Type) $~ (x :: foo) = Return (g $~ (f $~ x))
type (Optional fallback f :: A (Maybe s :-> IsA t) -> Type) $~ (Nothing :: Maybe s) Source # 
Instance details

Defined in Data.Kind.Extra

type (Optional fallback f :: A (Maybe s :-> IsA t) -> Type) $~ (Nothing :: Maybe s) = fallback
type (Optional fallback f :: A (Maybe foo :-> IsA t) -> Type) $~ (Just s :: Maybe foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Optional fallback f :: A (Maybe foo :-> IsA t) -> Type) $~ (Just s :: Maybe foo) = f $~ s
type (DescriptorOfDecoderSpecificInfo :: A (DecoderSpecificInfo ot st :-> Descriptor DecSpecificInfo) -> Type) $~ (MkDecoderSpecificInfo body :: DecoderSpecificInfo ot st) Source # 
Instance details

Defined in Data.ByteString.Mp4.Boxes.DecoderSpecificInfo

type (f :^>>>^: g :: A (IsA foo :-> IsA o) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :^>>>^: g :: A (IsA foo :-> IsA o) -> Type) $~ (x :: IsA foo) = Return (g $~ (f $~ Eval x))

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

Eval and ApplyCompose functions

Instances
type Eval (x :>>=: f :: A foo2 -> Type) Source # 
Instance details

Defined in Data.Kind.Extra

type Eval (x :>>=: f :: A foo2 -> Type) = Eval (f $~ Eval x)

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

Compose functions

Instances
type (f :>>>: g :: A (foo :-> bar2) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :>>>: g :: A (foo :-> bar2) -> Type) $~ (x :: foo) = g $~ (f $~ x)

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

Eval Input & Compose

Instances
type (f :^>>>: g :: A (IsA foo :-> bar2) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :^>>>: g :: A (IsA foo :-> bar2) -> Type) $~ (x :: IsA foo) = g $~ (f $~ Eval x)

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

Compose and Return

Instances
type (f :>>>^: g :: A (foo :-> IsA o) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :>>>^: g :: A (foo :-> IsA o) -> Type) $~ (x :: foo) = Return (g $~ (f $~ x))

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

Eval compose and return

Instances
type (f :^>>>^: g :: A (IsA foo :-> IsA o) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (f :^>>>^: g :: A (IsA foo :-> IsA o) -> Type) $~ (x :: IsA foo) = Return (g $~ (f $~ Eval x))

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

A function that applies Eval

Instances
type (Extract :: A (IsA foo :-> foo) -> Type) $~ (x :: IsA foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Extract :: A (IsA foo :-> foo) -> Type) $~ (x :: IsA foo) = Eval 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 (Optional fallback f :: A (Maybe s :-> IsA t) -> Type) $~ (Nothing :: Maybe s) Source # 
Instance details

Defined in Data.Kind.Extra

type (Optional fallback f :: A (Maybe s :-> IsA t) -> Type) $~ (Nothing :: Maybe s) = fallback
type (Optional fallback f :: A (Maybe foo :-> IsA t) -> Type) $~ (Just s :: Maybe foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Optional fallback f :: A (Maybe foo :-> IsA t) -> Type) $~ (Just s :: Maybe foo) = 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 (Fun1 f :: A (foo :-> IsA b) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Fun1 f :: A (foo :-> IsA b) -> Type) $~ (x :: foo) = f x

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

Instances
type (Fun2 f :: A (foo :-> IsA (a :-> IsA b)) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Fun2 f :: A (foo :-> IsA (a :-> IsA b)) -> Type) $~ (x :: foo) = Fun1 (f x)

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

Instances
type (Fun3 f :: A (foo :-> IsA (a :-> IsA (b :-> IsA c))) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

type (Fun3 f :: A (foo :-> IsA (a :-> IsA (b :-> IsA c))) -> Type) $~ (x :: foo) = Fun2 (f x)

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

Instances
type (Fun4 f :: A (foo :-> IsA (a :-> IsA (b :-> IsA (c :-> IsAn d)))) -> Type) $~ (x :: foo) Source # 
Instance details

Defined in Data.Kind.Extra

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