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