summaryrefslogtreecommitdiff
path: root/Presence/Nesting.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/Nesting.hs')
-rw-r--r--Presence/Nesting.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Presence/Nesting.hs b/Presence/Nesting.hs
index 24f9baad..850cb8c0 100644
--- a/Presence/Nesting.hs
+++ b/Presence/Nesting.hs
@@ -27,6 +27,12 @@ doNestingXML m =
27nesting :: Monad m => NestingXML o m Int 27nesting :: Monad m => NestingXML o m Int
28nesting = lift $ (return . nestingLevel) =<< get 28nesting = lift $ (return . nestingLevel) =<< get
29 29
30xmlLang :: Monad m => NestingXML o m (Maybe Lang)
31xmlLang = fmap (fmap snd . top . langStack) (lift get)
32 where
33 top ( a :! as ) = Just a
34 top _ = Nothing
35
30 36
31trackNesting :: Monad m => ConduitM Event Event (StateT XMLState m) () 37trackNesting :: Monad m => ConduitM Event Event (StateT XMLState m) ()
32trackNesting = awaitForever doit 38trackNesting = awaitForever doit
@@ -77,3 +83,4 @@ nextElement = do
77 if (lvl'>=lvl) then loop 83 if (lvl'>=lvl) then loop
78 else return Nothing 84 else return Nothing
79 85
86