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

Export parseHStore #132

Closed
lykahb opened this issue Nov 20, 2014 · 4 comments
Closed

Export parseHStore #132

lykahb opened this issue Nov 20, 2014 · 4 comments

Comments

@lykahb
Copy link

lykahb commented Nov 20, 2014

I would like to reuse HStore parsing in the Groundhog ORM library to add support for HStoreList and HStoreMap. The code that does parsing is pure so I can't call fromField.

@lpsmith
Copy link
Owner

lpsmith commented Nov 21, 2014

Do you need the attoparsec parser, or would a parseHStoreList :: ByteString -> Either String HStoreList suffice?

@lykahb
Copy link
Author

lykahb commented Nov 21, 2014

Thank you, function parseHStoreList will be good enough for me.

Perhaps a pure class function like fromField that returns Parser would be more composable. The fromField instances I saw used IO only for getting types from oid.

@lykahb
Copy link
Author

lykahb commented Nov 25, 2014

Thank you!

@lpsmith
Copy link
Owner

lpsmith commented Nov 25, 2014

You are welcome. =)

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

No branches or pull requests

2 participants