Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data StrRep
- = C
- | Pascal ISize Endianness
- newtype Str (rep :: StrRep) = Str {
- getStr :: ByteString
- fromBinCString :: Get ByteString
- data WellSized
- type LenPfx size e = Str ('Pascal size e)
Documentation
TODO
Instances
BinaryCodecWith StrRep ByteString Source # | |
Defined in Binrep.Types.Strings toBinWith :: StrRep -> ByteString -> Either String Builder Source # fromBinWith :: StrRep -> Get ByteString Source # |
newtype Str (rep :: StrRep) Source #
TODO
We also use this as a predicate, because the Pascal
constructor looks
identical to what we would want for a LengthPrefixed
predicate.
Str | |
|
Instances
BinaryCodecWith _r (Str 'C) Source # | |
ByteLen (Str 'C) Source # | |
ByteLen (I 'U size e) => ByteLen (Str ('Pascal size e)) Source # | |
BinaryCodec (Str 'C) Source # | Total shite parsing efficiency. But, to be fair, that's why we don't serialize arbitrary-length C strings! |
(Foldable f, Typeable f, Typeable e) => Predicate (LenPfx 'I4 e) (f a) Source # | |
Defined in Binrep.Types.Strings | |
(ByteLen a, itype ~ I 'U size e, ByteLen itype) => ByteLen (WithRefine 'Enforced (LenPfx size e) a) Source # | TODO why safe |
Defined in Binrep.Types.Strings | |
(BinaryCodec a, irep ~ IRep 'U size, itype ~ I 'U size e, Num irep, Integral irep, BinaryCodec itype) => BinaryCodec (WithRefine 'Enforced (LenPfx size e) [a]) Source # | TODO why safe |
Defined in Binrep.Types.Strings | |
BinaryCodec (WithRefine 'Enforced WellSized (Str ('Pascal 'I1 e))) Source # | TODO explain why safe |