summaryrefslogtreecommitdiff
path: root/dht/Presence/Nesting.hs
diff options
context:
space:
mode:
Diffstat (limited to 'dht/Presence/Nesting.hs')
-rw-r--r--dht/Presence/Nesting.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/dht/Presence/Nesting.hs b/dht/Presence/Nesting.hs
index 403d63cf..a9e550d4 100644
--- a/dht/Presence/Nesting.hs
+++ b/dht/Presence/Nesting.hs
@@ -24,12 +24,10 @@ doNestingXML :: Monad m => NestingXML o m r -> ConduitM Event o m r
24doNestingXML m = 24doNestingXML m =
25 evalStateC (XMLState 0 StrictNil) (trackNesting .| m) 25 evalStateC (XMLState 0 StrictNil) (trackNesting .| m)
26 26
27startNestingXML :: Monad m => NestingXML o m r -> ConduitM Event o m (r, XMLState) 27startNestingXML :: Monad m => NestingXML o m r -> ConduitM Event o m (r, NestingXML o m ())
28startNestingXML m = 28startNestingXML m = do
29 runStateC (XMLState 0 StrictNil) (trackNesting .| m) 29 (r,st) <- runStateC (XMLState 0 StrictNil) (trackNesting .| m)
30 30 return (r, lift $ put st)
31finishNestingXML :: Monad m => XMLState -> NestingXML o m r -> ConduitM Event o m r
32finishNestingXML = evalStateC
33 31
34nesting :: Monad m => NestingXML o m Int 32nesting :: Monad m => NestingXML o m Int
35nesting = lift $ (return . nestingLevel) =<< get 33nesting = lift $ (return . nestingLevel) =<< get