mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-12-26 20:12:09 +03:00
Fix stream hoisting
This commit is contained in:
parent
979e406f58
commit
6a47cacbdf
@ -60,7 +60,7 @@ library
|
||||
text >= 1.1 && < 1.3,
|
||||
hashable == 1.2.*,
|
||||
-- control:
|
||||
list-t >= 0.2.1 && < 0.3,
|
||||
list-t >= 0.2.4 && < 0.3,
|
||||
monad-control == 0.3.*,
|
||||
transformers-base == 0.4.*,
|
||||
-- errors:
|
||||
|
@ -193,8 +193,6 @@ hoistBackendStream ::
|
||||
Backend.ResultsStream b -> ResultsStream b l s r
|
||||
hoistBackendStream (w, s) =
|
||||
TransactionListT $ hoist (Transaction . lift) $ do
|
||||
row <- replicateM w s
|
||||
either (lift . throwIO . parsingError) return $ RowParser.parse row
|
||||
where
|
||||
parsingError t =
|
||||
ResultParsingError t
|
||||
row <- ($ s) $ ListT.slice $ fromMaybe ($bug "Invalid row width") $ ListT.positive w
|
||||
either (lift . throwIO . ResultParsingError) return $ RowParser.parse row
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user