binary icon indicating copy to clipboard operation
binary copied to clipboard

Support decoding from a Get monad

Open ezyang opened this issue 11 years ago • 2 comments
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.

ezyang avatar Jul 23 '14 19:07 ezyang

There's some other related refactoring that could be done, but this is the most important one for me.

ezyang avatar Jul 23 '14 19:07 ezyang

Is there a reason not to merge this?

andreasabel avatar Jul 07 '15 09:07 andreasabel