Safe Haskell | None |
---|---|
Language | Haskell2010 |
The basic parser.
- data Parser m s a
- data ParseError
- parseEither :: Monad m => s -> Parser m s a -> m (Either ParseError a)
- begin :: Monad m => Text -> Parser m [Object] a -> Parser m Object a
- object :: Monad m => Text -> Parser m [Object] a -> Parser m [Object] a
- objects :: Monad m => Text -> Parser m [Object] a -> Parser m [Object] [a]
- property :: Monad m => Text -> Parser m [Object] Text
- properties :: Monad m => Text -> Parser m [Object] [Text]
- local :: Monad m => t -> Parser m t a -> Parser m s a
- parseError :: Monad m => ParseError -> Parser m o a
- getState :: Monad m => Parser m s s
- putState :: Monad m => s -> Parser m s ()
Types
Parser type.
data ParseError Source #
A parse error.
Handy starter functions
parseEither :: Monad m => s -> Parser m s a -> m (Either ParseError a) Source #
Parse some iCalendar thing.
Combinators
begin :: Monad m => Text -> Parser m [Object] a -> Parser m Object a Source #
Require the given object name to exist and run in that context.
object :: Monad m => Text -> Parser m [Object] a -> Parser m [Object] a Source #
Lookup an object with this name in the current object's children, then run with that object as the context.
objects :: Monad m => Text -> Parser m [Object] a -> Parser m [Object] [a] Source #
Lookup objects with this name in the current object's children, then run with that object as the context.
Lookup a property.
Get all values of a property.
Parser library
local :: Monad m => t -> Parser m t a -> Parser m s a Source #
Use a local state of a different type.
parseError :: Monad m => ParseError -> Parser m o a Source #
Throw a parse error.