Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor decodeFileOrFail to have decodeGetFileOrFail, fixing #57. #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Jul 23, 2014

Signed-off-by: Edward Z. Yang [email protected]

-- | Decode a value from a file using a 'Get' monad. In case of success, the
-- value will be returned in 'Right'. In case of decoder errors, the error
-- message together with the byte offset will be returned.
decodeGetFileOrFail :: Get a -> FilePath -> IO (Either (ByteOffset, String) a)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function probably belongs in Data.Binary.Get and should probably be called runGetSomething. We're going to split off Data.Binary from Data.Binary.Get, the former being a particular serialization format and the latter being a generic binary data parser.

/cc @dcoutts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants