summaryrefslogtreecommitdiff
path: root/Presence/Nesting.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-02-19 16:35:24 -0500
committerjoe <joe@jerkface.net>2014-02-19 16:35:24 -0500
commitac3702dd365691cc9abf37248633f00f1e06cb12 (patch)
tree4f38dcfe2a1dcfd451cf3709f80f88ddf42f6ce6 /Presence/Nesting.hs
parentefa31511ba65989facc1171983d97a806908606c (diff)
more type signatures
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)