binary
binary copied to clipboard
I can't just get the answer and builder out of Put in a single call.
trafficstars
There is no way to get out Put a -> (a, Builder) in a single call.
This is also a wart in the design of cereal.
This seems to be a bit of a lacuna in the current design.
So you want back the item you just wrote?
PutM is a Monad. I have a legitimate usecase where I want to lift a PutM computation into a larger monad, which is juggling 3 such builders simultaneously, with some delicate interplay between the information being written to each, but to be able to do so I need to be able to "run" it without destroying all benefit of using it in the first place by round-tripping out to ByteString, so yes.