mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-11-26 01:33:08 +03:00
Fix the strictness of the foldl decoder (#140)
This commit is contained in:
parent
7a53a06960
commit
f3cc8542ca
@ -164,7 +164,7 @@ foldl step init rowDec =
|
||||
rowResult <- Row.run rowDec (result, intToRow rowIndex, maxCols, integerDatetimes)
|
||||
case rowResult of
|
||||
Left !x -> writeIORef failureRef (Just (RowError rowIndex x))
|
||||
Right !x -> modifyIORef accRef (\acc -> step acc x)
|
||||
Right !x -> modifyIORef' accRef (\acc -> step acc x)
|
||||
readIORef failureRef >>= \case
|
||||
Nothing -> Right <$> readIORef accRef
|
||||
Just x -> pure (Left x)
|
||||
|
Loading…
Reference in New Issue
Block a user