Fix stream hoisting

This commit is contained in:
Nikita Volkov 2014-10-17 21:24:33 +04:00
parent 979e406f58
commit 6a47cacbdf
2 changed files with 4 additions and 6 deletions

View File

@ -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:

View File

@ -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