xournal-parser-0.4.1: Xournal file parser

PortabilityGHC
Stabilityexperimental
MaintainerIan-Woo Kim <ianwookim@gmail.com>
Safe HaskellSafe-Infered

Text.Xournal.Parse.Enumerator

Contents

Description

 

Synopsis

utils

trc :: Show a => String -> a -> b -> bSource

flipap :: a -> (a -> b) -> bSource

unit :: Monad m => m ()Source

many1eventWrkr :: Monad m => (Text, Text) -> ([a] -> [a]) -> (Event -> Iteratee Event m (Either String a)) -> Iteratee Event m (Either String [a])Source

parsers

pXournal :: Monad m => Iteratee Event m (Either String Xournal)Source

parse whole xournal file

pPage :: Monad m => Event -> Iteratee Event m (Either String Page)Source

parse one page

for each event

predicates

isStart :: Text -> Event -> BoolSource

check start of element with name txt

isEnd :: Text -> Event -> BoolSource

check end of element with name txt

driver routines

parseXmlFile :: MonadIO m => Handle -> Iteratee Event m a -> m aSource

generic xml file driver

iterPrint :: (Show s, MonadIO m) => Iteratee s m ()Source

printing for debug