Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data StaticExpandableContent :: BitRecord -> IsA BitRecord
- type StaticExpandableContentMaxBits = 32
- type family ExpandableSize (s :: Nat) :: BitRecord where ...
- type ExpandableSizeLastChunk s = (Field 1 := 0) .+. (Field 7 := s)
- type family ExpandableSizeNext (s :: Nat) :: BitRecord where ...
- type ExpandableSizeNextChunk s = (Field 1 := 1) .+. (Field 7 := s)
- newtype Expandable t where
- Expandable :: t -> Expandable t
- expandableSizeSize :: BoxSize -> BoxSize
- expandableSizeBuilder :: BoxSize -> Builder
Static Expandable
data StaticExpandableContent :: BitRecord -> IsA BitRecord Source #
type Eval BitRecord (StaticExpandableContent record) Source # | |
type StaticExpandableContentMaxBits = 32 Source #
type family ExpandableSize (s :: Nat) :: BitRecord where ... Source #
ExpandableSize 0 = EmptyBitRecord | |
ExpandableSize s = If (s <=? 127) (ExpandableSizeLastChunk s) (ExpandableSizeNext (ShiftR StaticExpandableContentMaxBits s 7) :+: ExpandableSizeLastChunk s) |
type family ExpandableSizeNext (s :: Nat) :: BitRecord where ... Source #
ExpandableSizeNext 0 = EmptyBitRecord | |
ExpandableSizeNext s = If (s <=? 127) (ExpandableSizeNextChunk s) (ExpandableSizeNext (ShiftR StaticExpandableContentMaxBits s 7) :+: ExpandableSizeNextChunk s) |
Runtime-value Expandable
newtype Expandable t where Source #
Expandable :: t -> Expandable t |
IsBoxContent t => IsBoxContent (Expandable t) Source # | |
expandableSizeSize :: BoxSize -> BoxSize Source #