streamly
streamly copied to clipboard
Add monads for hiding serialization/deserialization state
For the Unbox type class we have Peeker monad. It could use the Array or MutArray type instead of BoundedPtr. Similarly, we can write a Poker monad which can use the MutArray type.
Similarly, we can write Serializer, Deserializer or Get/Put monads for the Serialize type class based serializations. And they can use Array and MutArray type similar to the Unbox type class.
For correcting the signature of deserializeAt, we can rename serialize/deserialize to putAt/getAt.