module Data.ParserCombinators.KangarooWriter
(
Kangaroo
, parse
, runKangaroo
, tell
, ParseErr
, RegionCoda(..)
, RegionName
, liftIOAction
, reportError
, substError
, word8
, satisfy
, checkWord8
, opt
, skip
, position
, region
, atEnd
, lengthRemaining
, regionSize
, intraparse
, advance
, advanceRelative
, restrict
, restrictToPos
, printHexAll
, printHexRange
, printRegionStack
, module Data.ParserCombinators.Kangaroo.Combinators
, module Data.ParserCombinators.Kangaroo.Prim
) where
import Data.ParserCombinators.Kangaroo.Combinators
import Data.ParserCombinators.Kangaroo.ParseMonad
import Data.ParserCombinators.Kangaroo.Prim
import Data.Monoid
type Kangaroo r a = GenKangaroo r a
parse :: Monoid w
=> Kangaroo w a
-> FilePath
-> IO (Either ParseErr a,w)
parse = runKangaroo
runKangaroo :: Monoid w
=> Kangaroo w a
-> FilePath
-> IO (Either ParseErr a,w)
runKangaroo p filename = runGenKangaroo p mempty filename
tell :: Monoid w => w -> Kangaroo w ()
tell s = getUserSt >>= \w -> putUserSt $ w `mappend` s