binary
binary copied to clipboard
Support decoding from a Get monad
trafficstars
I prefer not to ask for convenience functions willy-nilly, but I think refactoring decodeFileOrFail with this signature would be useful:
decodeGetFileOrFail :: Get a -> FilePath -> IO (Either (ByteOffset, String) a)
The reason is because there is a nontrivial chunk of code for running the incremental parser that preferably we'd avoid duplicating. I'll submit a PR soon.
There's some other related refactoring that could be done, but this is the most important one for me.
Is there a reason not to merge this?