org-parser-0.1.0.0: Parser for Org Mode documents.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Org.Parser

Synopsis

Documentation

data OrgParser a Source #

Instances

Instances details
MonadFail OrgParser Source # 
Instance details

Defined in Org.Parser.Definitions

Methods

fail :: String -> OrgParser a Source #

Alternative OrgParser Source # 
Instance details

Defined in Org.Parser.Definitions

Applicative OrgParser Source # 
Instance details

Defined in Org.Parser.Definitions

Methods

pure :: a -> OrgParser a Source #

(<*>) :: OrgParser (a -> b) -> OrgParser a -> OrgParser b Source #

liftA2 :: (a -> b -> c) -> OrgParser a -> OrgParser b -> OrgParser c Source #

(*>) :: OrgParser a -> OrgParser b -> OrgParser b Source #

(<*) :: OrgParser a -> OrgParser b -> OrgParser a Source #

Functor OrgParser Source # 
Instance details

Defined in Org.Parser.Definitions

Methods

fmap :: (a -> b) -> OrgParser a -> OrgParser b Source #

(<$) :: a -> OrgParser b -> OrgParser a Source #

Monad OrgParser Source # 
Instance details

Defined in Org.Parser.Definitions

Methods

(>>=) :: OrgParser a -> (a -> OrgParser b) -> OrgParser b Source #

(>>) :: OrgParser a -> OrgParser b -> OrgParser b Source #

return :: a -> OrgParser a Source #

MonadPlus OrgParser Source # 
Instance details

Defined in Org.Parser.Definitions

MonadParsec Void Text OrgParser Source # 
Instance details

Defined in Org.Parser.Definitions

data OrgOptions Source #

Instances

Instances details
FromJSON OrgOptions Source # 
Instance details

Defined in Org.Parser.State

ToJSON OrgOptions Source # 
Instance details

Defined in Org.Parser.State

Generic OrgOptions Source # 
Instance details

Defined in Org.Parser.State

Associated Types

type Rep OrgOptions :: Type -> Type Source #

Show OrgOptions Source # 
Instance details

Defined in Org.Parser.State

NFData OrgOptions Source # 
Instance details

Defined in Org.Parser.State

Methods

rnf :: OrgOptions -> () Source #

Eq OrgOptions Source # 
Instance details

Defined in Org.Parser.State

Ord OrgOptions Source # 
Instance details

Defined in Org.Parser.State

type Rep OrgOptions Source # 
Instance details

Defined in Org.Parser.State

type Rep OrgOptions = D1 ('MetaData "OrgOptions" "Org.Parser.State" "org-parser-0.1.0.0-inplace" 'False) (C1 ('MetaCons "OrgOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "orgSrcPreserveIndentation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "orgSrcTabWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "orgTodoKeywords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TodoSequence))) :*: (S1 ('MetaSel ('Just "orgElementParsedKeywords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set Text)) :*: (S1 ('MetaSel ('Just "orgElementDualKeywords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set Text)) :*: S1 ('MetaSel ('Just "orgElementAffiliatedKeywords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set Text))))))

type TodoSequence = [TodoKeyword] Source #

Collection of todo markers in the order in which items should progress

parseOrgMaybe :: OrgOptions -> OrgParser a -> Text -> Maybe a Source #

Evaluate the Org Parser state with the desired options. Returns Nothing in case of parse failure.

parseOrg :: OrgOptions -> OrgParser a -> FilePath -> Text -> Either OrgParseError a Source #

Wrapper around parse that evaluates the Org Parser state with the desired options.

parseOrgDoc :: OrgOptions -> FilePath -> Text -> Either OrgParseError OrgDocument Source #

Parse an Org document fully, with given options, and a filepath for error messages.

parseOrgDocIO :: MonadIO m => OrgOptions -> FilePath -> m OrgDocument Source #

Parse an Org document in a UTF8 file, with given options.