@@ -154,6 +154,13 @@ instance FromField HStoreMap where
154154 fromField f mdat = convert <$> fromField f mdat
155155 where convert (HStoreList xs) = HStoreMap (Map.fromList xs)
156156
157+parseHStoreList :: BS.ByteString -> Either String HStoreList
158+parseHStoreList dat =
159+ case P.parseOnly (parseHStore <* P.endOfInput) dat of
160+ Left err -> Left (show err)
161+ Right (Left err) -> Left (show err)
162+ Right (Right val) -> Right val
163+
157164parseHStore :: P.Parser (Either UnicodeException HStoreList)
158165parseHStore = do
159166 kvs <- P.sepBy' (skipWhiteSpace *> parseHStoreKeyVal)