binrep-0.1.0: Encode binary representations via types.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Binrep.Predicates.NullPadTo

Documentation

data NullPadTo (n :: Nat) Source #

Instances

Instances details
(ByteLen a, KnownNat n) => Predicate (NullPadTo n) a Source # 
Instance details

Defined in Binrep.Predicates.NullPadTo

KnownNat n => ByteLen (WithRefine 'Enforced (NullPadTo n) a) Source # 
Instance details

Defined in Binrep.Predicates.NullPadTo

(BinaryCodec a, ByteLen a, KnownNat n) => BinaryCodec (WithRefine 'Enforced (NullPadTo n) a) Source #

predicate is inherently enforced due to checking length to calculate how many succeeding nulls to parse

Note that the consumer probably doesn't care about the content of the padding, just that the data is chunked correctly. I figure we care about correctness here, so it'd be nice to know about the padding well-formedness (i.e. that it's all nulls).

Instance details

Defined in Binrep.Predicates.NullPadTo