summaryrefslogtreecommitdiffstats
path: root/Redland
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2018-02-23 23:48:35 +0300
committerdefanor <defanor@uberspace.net>2018-02-23 23:48:35 +0300
commit65668579e840b1587f7b70d0e44e11bc8ba08369 (patch)
tree3cae40437ed13e7d06a7b93f15583a9f30b7bbe8 /Redland
parentdbb9e6be6cb4bb4fdc465260bb435a8297ae666e (diff)
downloadredland-65668579e840b1587f7b70d0e44e11bc8ba08369.zip
redland-65668579e840b1587f7b70d0e44e11bc8ba08369.tar.gz
redland-65668579e840b1587f7b70d0e44e11bc8ba08369.tar.bz2
Call streamGetObject with withNew
Diffstat (limited to 'Redland')
-rw-r--r--Redland/Util.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Redland/Util.hs b/Redland/Util.hs
index e7ac295..0940cfc 100644
--- a/Redland/Util.hs
+++ b/Redland/Util.hs
@@ -212,8 +212,8 @@ streamToList stream = do
done <- streamEnd stream
if done
then pure []
- else do
- triple <- streamGetObject stream >>= statementToTriple
+ else withNew (streamGetObject stream) $ \statement -> do
+ triple <- statementToTriple statement
next <- streamNext stream
rest <- if next then streamToList stream else pure []
pure (triple : rest)