-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A parser and writer for org-mode flavored documents. -- @package orgmode-parse @version 0.0.0.1 -- | Parsing combinators for org-list headings. module Data.OrgMode.Parse.Attoparsec.Headings data Heading Heading :: Int -> Maybe Priority -> Maybe State -> Text -> [Keyword] -> Heading level :: Heading -> Int priority :: Heading -> Maybe Priority state :: Heading -> Maybe State title :: Heading -> Text keywords :: Heading -> [Keyword] data Priority A :: Priority B :: Priority C :: Priority Unknown :: Priority newtype State State :: Text -> State newtype Keyword Keyword :: Text -> Keyword toPriority :: Text -> Priority -- | Parse an org-mode heading. heading :: Parser Text Heading -- | Parse the asterisk indicated heading level until a space is reached. headingLevel :: Parser Text Int -- | Parse the priority indicator. -- -- If anything but these priority indicators are used the parser will -- fail: `[B]`, `[#C]`. headingPriority :: Parser Text (Maybe Priority) -- | Title parser with alternative. -- -- This function tries to parse a title with a keyword and if it fails it -- then attempts to parse everything till the end of the line. headingTitle :: Parser Text (Text, Maybe Keyword) -- | Parse a heading keyword. -- -- You can use this with many' and catMaybes to get a list -- keywords: -- --
--   keys <- many' headingKeyword
--   return $ catMaybes keys
--   
headingKeyword :: Parser Text (Maybe Keyword) -- | Attoparsec combinators for orgmode documents. module Data.OrgMode.Parse