summaryrefslogtreecommitdiff
path: root/Presence/Nesting.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/Nesting.hs')
-rw-r--r--Presence/Nesting.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Presence/Nesting.hs b/Presence/Nesting.hs
index 850cb8c0..dd0e4113 100644
--- a/Presence/Nesting.hs
+++ b/Presence/Nesting.hs
@@ -52,6 +52,7 @@ trackNesting = awaitForever doit
52 yield xml 52 yield xml
53 53
54 54
55lookupLang :: [(Name, [Content])] -> Maybe S.Text
55lookupLang attrs = 56lookupLang attrs =
56 case List.find ( (=="xml:lang") . fst) attrs of 57 case List.find ( (=="xml:lang") . fst) attrs of
57 Just (_,[ContentText x]) -> Just x 58 Just (_,[ContentText x]) -> Just x
@@ -67,6 +68,9 @@ awaitCloser lvl = do
67 xml <- await 68 xml <- await
68 maybe (return ()) (const loop) xml 69 maybe (return ()) (const loop) xml
69 70
71withXML ::
72 Monad m =>
73 (i -> ConduitM i o m ()) -> ConduitM i o m ()
70withXML f = await >>= maybe (return ()) f 74withXML f = await >>= maybe (return ()) f
71 75
72nextElement :: Monad m => NestingXML o m (Maybe Event) 76nextElement :: Monad m => NestingXML o m (Maybe Event)