Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Documentation
type Poke# = Addr# -> State# RealWorld -> (# State# RealWorld, Addr# #) Source #
TODO inner poke type
TODO can I change this to
Ptr Word8 -> IO (Ptr Word8)
without any performance loss? it's the same underneath newtypes and datas.
Ptr
is a data rather than a newtype, but IO is just a newtype.
I originally did this to beat ptr-poker, but idk. Now doubtful.
Unboxed poke operation.
A newtype allows us a monoidal interface.
Instances
Monoid Poke Source # | The empty |
Semigroup Poke Source # | Sequence two |
Put Poke Source # | |
GenericFoldMap Poke Source # | |
Defined in Binrep.Put.Bytezap type GenericFoldMapC Poke a # genericFoldMapF :: GenericFoldMapC Poke a => a -> Poke # | |
type GenericFoldMapC Poke a Source # | |
Defined in Binrep.Put.Bytezap |
Instructions on how to perform a sized write.
The Poke
in writePoke
must write the _exact_ number of bytes specified in
writeSize
. Otherwise, your computer explodes.
Instances
Monoid Write Source # | |
Semigroup Write Source # | Sequence the |
Show Write Source # | Serialize and show the resulting ByteString. |
BLen Write Source # | |
Get Write Source # | Parse a bytestring and... immediate reserialize it. Note that this _does_ perform work: we make a new bytestring so we don't rely on the input bytestring. To use the input bytestring directly, see Binrep.Type.Thin. |
Put Write Source # | |
Put Write Source # | |
Get (Thin Write) Source # | |
runWrite :: Write -> ByteString Source #