Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Documentation
data CountPrefix (pfx :: Type) Source #
Instances
(KnownNat (Max pfx), Foldable f, Typeable pfx) => Predicate1 (CountPrefix pfx :: Type) (f :: Type -> Type) Source # | |
Defined in Binrep.Type.Prefix.Count validate1 :: forall (a :: k). Proxy (CountPrefix pfx) -> f a -> Maybe RefineException # | |
(KnownNat (Max pfx), Foldable f, Typeable pfx) => Predicate (CountPrefix pfx :: Type) (f a) Source # | |
Defined in Binrep.Type.Prefix.Count validate :: Proxy (CountPrefix pfx) -> f a -> Maybe RefineException # | |
IsCBLen (CountPrefixed pfx f a :: Type) Source # | We can know byte length at compile time _if_ we know it for the prefix and the list-like. This is extremely unlikely, because then what counting are we even performing for the list-like? But it's a valid instance. |
Defined in Binrep.Type.Prefix.Count type CBLen (CountPrefixed pfx f a) :: Natural Source # | |
(Prefix pfx, Foldable f, BLen pfx, BLen (f a)) => BLen (CountPrefixed pfx f a) Source # | The byte length of a count-prefixed type is the length of the prefix type (holding the length of the type) plus the length of the type. Bit confusing. How to explain this? TODO |
Defined in Binrep.Type.Prefix.Count blen :: CountPrefixed pfx f a -> Int Source # | |
(Prefix pfx, GetCount f, Get pfx, Get a) => Get (CountPrefixed pfx f a) Source # | |
Defined in Binrep.Type.Prefix.Count get :: Getter (CountPrefixed pfx f a) Source # | |
(Prefix pfx, Foldable f, Put pfx, Put (f a)) => Put (CountPrefixed pfx f a) Source # | |
Defined in Binrep.Type.Prefix.Count put :: CountPrefixed pfx f a -> Putter Source # | |
type CBLen (CountPrefixed pfx f a :: Type) Source # | |
Defined in Binrep.Type.Prefix.Count |
type CountPrefixed pfx = Refined1 (CountPrefix pfx) Source #