From 65668579e840b1587f7b70d0e44e11bc8ba08369 Mon Sep 17 00:00:00 2001 From: defanor Date: Fri, 23 Feb 2018 23:48:35 +0300 Subject: Call streamGetObject with withNew --- Redland/Util.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Redland/Util.hs') 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) -- cgit v1.2.3