Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family PositiveInt (n :: Nat) where ...
- type family NegativeInt (n :: Nat) where ...
- type family Bits (xs :: [Nat]) where ...
- class LiteralFamily a typeLitKind | a -> typeLitKind where
- type InRange a (typeLit :: typeLitKind) :: Bool
- type Pretty a (typeLit :: typeLitKind) :: PrettyType
- type PrettySeperator a (typeLit :: typeLitKind) :: PrettyType
- type SizeOf a (typeLit :: typeLitKind) :: Nat
- type family To s (x :: k) where ...
- data Value s k (x :: k) :: Type
- data Empty
- data Bit
- data Byte
- data Signed t v
- type SignedByte = Signed Byte Nat
- type SignedInteger = Signed Nat Nat
- data Sequence s k
Documentation
type family PositiveInt (n :: Nat) where ... Source #
type family NegativeInt (n :: Nat) where ... Source #
type family Bits (xs :: [Nat]) where ... Source #
A literal bit sequence. The sequence is validated, only zeros and ones are allowed.
class LiteralFamily a typeLitKind | a -> typeLitKind Source #
A kind class for kinds, that are inhabited on type-level by a certain kind of literal.
a
- This parameter identifies the whole family; a type level literal kind of the family is determined by that parameter. No two instances for the same family but with different type level literal kinds are allowed.
typeLitKind
- This is the kind of type level literals representing the static values inhabiting this family.
type InRange a (typeLit :: typeLitKind) :: Bool Source #
A predicate that is applied to a type-level-literal and is satisfied iff the given literal
is in the range of valid type-level-literals of kind typeLitKind
.
This is by SequenceLiteral
for example.
type Pretty a (typeLit :: typeLitKind) :: PrettyType Source #
Convert a type level representation to a PrettyType
type PrettySeperator a (typeLit :: typeLitKind) :: PrettyType Source #
Seperator to use when rendering a list of literals of this family.
type SizeOf a (typeLit :: typeLitKind) :: Nat Source #
Return the number of bits that the literal value will occupy
Instances
LiteralFamily Bool Bool Source # | |
LiteralFamily Word8 Nat Source # | |
LiteralFamily Word16 Nat Source # | |
LiteralFamily Nat Nat Source # | |
LiteralFamily () () Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
LiteralFamily Byte Nat Source # | |
LiteralFamily Bit Nat Source # | |
LiteralFamily Empty Empty Source # | |
LiteralFamily s k => LiteralFamily (Maybe s :: Type) (Maybe k) Source # | |
(LiteralFamily as ak, LiteralFamily bs bk) => LiteralFamily ((as, bs) :: Type) (ak, bk) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
LiteralFamily t v => LiteralFamily (Signed t v :: Type) (Signed t v) Source # | |
LiteralFamily s k2 => LiteralFamily (Sequence s k2 :: Type) [k2] Source # | |
data Value s k (x :: k) :: Type Source #
The representation of a value belonging to a LiteralFamily
Instances
type PrettyStructure (LiteralStructure (Value s k1 x) :: Structure FixSize -> Type) Source # | |
Defined in Data.Type.BitRecords.Structure type PrettyStructure (LiteralStructure (Value s k1 x) :: Structure FixSize -> Type) = "LiteralStructure" <:> Pretty s x | |
type ToPretty (Value s k1 x :: Type) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type GetStructureSize (LiteralStructure (Value s k1 x)) Source # | |
Defined in Data.Type.BitRecords.Structure |
An empty type literal
Instances
LiteralFamily Empty Empty Source # | |
type ToPretty Empty Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type PrettySeperator Empty (typeLit :: Empty) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits |
A bit literal
Instances
LiteralFamily Bit Nat Source # | |
type ToPretty Bit Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type InRange Bit (n :: Nat) Source # | |
type Pretty Bit (n :: Nat) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type PrettySeperator Bit (_ :: Nat) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type SizeOf Bit (_ :: Nat) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits |
An unsigned byte literal
Instances
LiteralFamily Byte Nat Source # | |
type ToPretty Byte Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type InRange Byte (n :: Nat) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type Pretty Byte (n :: Nat) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type PrettySeperator Byte (typeLit :: Nat) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type SizeOf Byte (_ :: Nat) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits |
A signed type literal for family t
over GHC type literal v
Instances
LiteralFamily t v => LiteralFamily (Signed t v :: Type) (Signed t v) Source # | |
type ToPretty (Signed t v :: Type) Source # | |
type PrettySeperator (Signed t v :: Type) (typeLit :: Signed t v) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type InRange (Signed t v :: Type) (Positive x :: Signed t v) Source # | |
type InRange (Signed t v :: Type) (Negative x :: Signed t v) Source # | |
type Pretty (Signed t v :: Type) (Positive x :: Signed t v) Source # | |
type Pretty (Signed t v :: Type) (Negative x :: Signed t v) Source # | |
type SizeOf (Signed t v :: Type) (Positive x :: Signed t v) Source # | |
type SizeOf (Signed t v :: Type) (Negative x :: Signed t v) Source # | |
type ToPretty (Negative v :: Signed t k2) Source # | |
type ToPretty (Positive v :: Signed t k2) Source # | |
A sequence of literals.
Instances
LiteralFamily s k2 => LiteralFamily (Sequence s k2 :: Type) [k2] Source # | |
type InRange (Sequence s k1 :: Type) (xs :: [k1]) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type Pretty (Sequence s k1 :: Type) (bs :: [k1]) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type PrettySeperator (Sequence s k2 :: Type) ([] :: [k2]) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type SizeOf (Sequence s k2 :: Type) ([] :: [k2]) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type PrettySeperator (Sequence s k1 :: Type) (x ': xs :: [k1]) Source # | |
Defined in Data.Type.BitRecords.Structure.TypeLits | |
type SizeOf (Sequence s k1 :: Type) (x ': xs :: [k1]) Source # | |
type ToPretty (Sequence t v :: Type) Source # | |