lpsmith / postgresql-simple

Mid-level client library for accessing PostgreSQL from Haskell
Other
206 stars 71 forks source link

Export parseHStore #132

Closed lykahb closed 9 years ago

lykahb commented 9 years ago

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 commented 9 years ago

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

lykahb commented 9 years ago

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 commented 9 years ago

Thank you!

lpsmith commented 9 years ago

You are welcome. =)