Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Documentation
Types which may be used as prefixes.
Generally, these will be integer types.
Note that this is separate to binary representation, so endianness is irrelevant.
TODO oops can't use Int
s everywhere because of overflow :'( that's OK
used by put. guaranteed that it fits from refined. that is, lenToPfx <= Max.
used by get. better not lie.
Instances
Prefix Word16 Source # | |
Prefix Word32 Source # | |
Prefix Word8 Source # | |
Prefix () Source # | Length prefixing with the unit means a length of 0. This is the only sensible case. 1 doesn't work because refining checks I think there are laws here, where using this is the same as doing nothing at all. |
Prefix a => Prefix (Endian end a) Source # | |