-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Parser for Emacs org-mode files. -- -- Parser for Emacs org-mode files. @package org-mode @version 2.0.2 -- | This library parses text in the Emacs Org Mode format. -- -- Use the org function to parse a Text value. module Data.Org -- | A complete .org file with metadata. data OrgFile OrgFile :: Map Text Text -> OrgDoc -> OrgFile -- | Top-level fields like: -- --
--   #+TITLE: Curing Cancer with Haskell
--   #+DATE: 2020-02-25
--   #+AUTHOR: Colin
--   
[orgMeta] :: OrgFile -> Map Text Text [orgDoc] :: OrgFile -> OrgDoc emptyOrgFile :: OrgFile -- | A recursive Org document. These are zero or more blocks of markup, -- followed by zero or more subsections. -- --
--   This is some top-level text.
--   
--   * Important heading
--   
--   ** Less important subheading
--   
data OrgDoc OrgDoc :: [Block] -> [Section] -> OrgDoc [docBlocks] :: OrgDoc -> [Block] [docSections] :: OrgDoc -> [Section] emptyDoc :: OrgDoc -- | All unique section tags in the entire document. -- -- Section tags appear on the same row as a header title, but -- right-aligned. -- --
--   * This is a Heading                :tag1:tag2:
--   
allDocTags :: OrgDoc -> Set Text -- | An org-mode timestamp. Must contain at least a year-month-day and the -- day of the week: -- --
--   <2021-04-27 Tue>
--   
-- -- but also may contain a time: -- --
--   <2021-04-27 Tue 12:00>
--   
-- -- or a time range: -- --
--   <2021-04-27 Tue 12:00-13:00>
--   
-- -- and/or a repeater value: -- --
--   <2021-04-27 Tue +1w>
--   
data OrgDateTime OrgDateTime :: Day -> DayOfWeek -> Maybe OrgTime -> Maybe Repeater -> Maybe Delay -> OrgDateTime [dateDay] :: OrgDateTime -> Day [dateDayOfWeek] :: OrgDateTime -> DayOfWeek [dateTime] :: OrgDateTime -> Maybe OrgTime [dateRepeat] :: OrgDateTime -> Maybe Repeater [dateDelay] :: OrgDateTime -> Maybe Delay -- | The time portion of the full timestamp. May be a range, as seen in the -- following full timestamp: -- --
--   <2021-04-27 Tue 12:00-13:00>
--   
data OrgTime OrgTime :: TimeOfDay -> Maybe TimeOfDay -> OrgTime [timeStart] :: OrgTime -> TimeOfDay [timeEnd] :: OrgTime -> Maybe TimeOfDay -- | An indication of how often a timestamp should be automatically -- reapplied in the Org Agenda. data Repeater Repeater :: RepeatMode -> Word -> Interval -> Repeater [repMode] :: Repeater -> RepeatMode [repValue] :: Repeater -> Word [repInterval] :: Repeater -> Interval -- | The nature of the repitition. data RepeatMode -- | Apply the interval value to the original timestamp once: + Single :: RepeatMode -- | Apply the interval value as many times as necessary to arrive on a -- future date: ++ Jump :: RepeatMode -- | Apply the interval value from today: .+ FromToday :: RepeatMode -- | Delay the appearance of a timestamp in the agenda. data Delay Delay :: DelayMode -> Word -> Interval -> Delay [delayMode] :: Delay -> DelayMode [delayValue] :: Delay -> Word [delayInterval] :: Delay -> Interval -- | When a repeater is also present, should the delay be for the first -- value or all of them? data DelayMode -- | As in: --2d DelayOne :: DelayMode -- | As in: -2d DelayAll :: DelayMode -- | The timestamp repitition unit. data Interval Hour :: Interval Day :: Interval Week :: Interval Month :: Interval Year :: Interval -- | A subsection, marked by a heading line and followed recursively by an -- OrgDoc. -- --
--   * This is a Heading
--   
--   This is content in the sub ~OrgDoc~.
--   
data Section Section :: Maybe Todo -> Maybe Priority -> NonEmpty Words -> [Text] -> Maybe OrgDateTime -> Maybe OrgDateTime -> Maybe OrgDateTime -> Maybe OrgDateTime -> Map Text Text -> OrgDoc -> Section [sectionTodo] :: Section -> Maybe Todo [sectionPriority] :: Section -> Maybe Priority [sectionHeading] :: Section -> NonEmpty Words [sectionTags] :: Section -> [Text] [sectionClosed] :: Section -> Maybe OrgDateTime [sectionDeadline] :: Section -> Maybe OrgDateTime [sectionScheduled] :: Section -> Maybe OrgDateTime -- | A timestamp for general events that are neither a DEADLINE nor -- SCHEDULED. [sectionTimestamp] :: Section -> Maybe OrgDateTime [sectionProps] :: Section -> Map Text Text [sectionDoc] :: Section -> OrgDoc -- | A mostly empty invoking of a Section. titled :: Words -> Section -- | All unique tags with a section and its subsections. allSectionTags :: Section -> Set Text -- | The completion state of a heading that is considered a "todo" item. data Todo TODO :: Todo DONE :: Todo -- | A priority value, usually associated with a TODO marking, as -- in: -- --
--   *** TODO [#A] Cure cancer with Haskell
--   *** TODO [#B] Eat lunch
--   
newtype Priority Priority :: Text -> Priority [priority] :: Priority -> Text -- | Some logically distinct block of Org content. data Block Quote :: Text -> Block Example :: Text -> Block Code :: Maybe Language -> Text -> Block List :: ListItems -> Block Table :: NonEmpty Row -> Block Paragraph :: NonEmpty Words -> Block -- | The fundamental unit of Org text content. Plain units are split -- word-by-word. data Words Bold :: Text -> Words Italic :: Text -> Words Highlight :: Text -> Words Underline :: Text -> Words Verbatim :: Text -> Words Strike :: Text -> Words Link :: URL -> Maybe Text -> Words Image :: URL -> Words Punct :: Char -> Words Plain :: Text -> Words -- | An org list constructed of - characters. -- --
--   - Feed the cat
--     - The good stuff
--   - Feed the dog
--     - He'll eat anything
--   - Feed the bird
--   - Feed the alligator
--   - Feed the elephant
--   
newtype ListItems ListItems :: NonEmpty Item -> ListItems -- | A line in a bullet-list. Can contain sublists, as shown in -- ListItems. data Item Item :: NonEmpty Words -> Maybe ListItems -> Item -- | A row in an org table. Can have content or be a horizontal rule. -- --
--   | A | B | C |
--   |---+---+---|
--   | D | E | F |
--   
data Row Break :: Row Row :: NonEmpty Column -> Row -- | A possibly empty column in an org table. data Column Empty :: Column Column :: NonEmpty Words -> Column -- | The url portion of a link. newtype URL URL :: Text -> URL -- | The programming language some source code block was written in. newtype Language Language :: Text -> Language -- | Attempt to parse an OrgFile. org :: Text -> Maybe OrgFile orgFile :: Parser OrgFile meta :: Parser (Map Text Text) orgP :: Parser OrgDoc section :: Int -> Parser Section properties :: Parser (Map Text Text) property :: Parser (Text, Text) paragraph :: Parser Block table :: Parser Block list :: Parser Block line :: Char -> Parser (NonEmpty Words) timestamp :: Parser OrgDateTime date :: Parser Day timeRange :: Parser OrgTime repeater :: Parser Repeater prettyOrgFile :: OrgFile -> Text prettyOrg :: OrgDoc -> Text prettyWords :: Words -> Text instance GHC.Show.Show Data.Org.OrgTime instance GHC.Classes.Ord Data.Org.OrgTime instance GHC.Classes.Eq Data.Org.OrgTime instance GHC.Show.Show Data.Org.RepeatMode instance GHC.Classes.Ord Data.Org.RepeatMode instance GHC.Classes.Eq Data.Org.RepeatMode instance GHC.Show.Show Data.Org.Interval instance GHC.Classes.Ord Data.Org.Interval instance GHC.Classes.Eq Data.Org.Interval instance GHC.Show.Show Data.Org.Repeater instance GHC.Classes.Ord Data.Org.Repeater instance GHC.Classes.Eq Data.Org.Repeater instance GHC.Show.Show Data.Org.DelayMode instance GHC.Classes.Ord Data.Org.DelayMode instance GHC.Classes.Eq Data.Org.DelayMode instance GHC.Show.Show Data.Org.Delay instance GHC.Classes.Ord Data.Org.Delay instance GHC.Classes.Eq Data.Org.Delay instance GHC.Show.Show Data.Org.OrgDateTime instance GHC.Classes.Eq Data.Org.OrgDateTime instance GHC.Generics.Generic Data.Org.Todo instance GHC.Show.Show Data.Org.Todo instance GHC.Classes.Ord Data.Org.Todo instance GHC.Classes.Eq Data.Org.Todo instance GHC.Generics.Generic Data.Org.Priority instance GHC.Show.Show Data.Org.Priority instance GHC.Classes.Ord Data.Org.Priority instance GHC.Classes.Eq Data.Org.Priority instance Data.Hashable.Class.Hashable Data.Org.URL instance GHC.Generics.Generic Data.Org.URL instance GHC.Show.Show Data.Org.URL instance GHC.Classes.Ord Data.Org.URL instance GHC.Classes.Eq Data.Org.URL instance Data.Hashable.Class.Hashable Data.Org.Words instance GHC.Generics.Generic Data.Org.Words instance GHC.Show.Show Data.Org.Words instance GHC.Classes.Ord Data.Org.Words instance GHC.Classes.Eq Data.Org.Words instance GHC.Generics.Generic Data.Org.Column instance GHC.Show.Show Data.Org.Column instance GHC.Classes.Ord Data.Org.Column instance GHC.Classes.Eq Data.Org.Column instance GHC.Generics.Generic Data.Org.Row instance GHC.Show.Show Data.Org.Row instance GHC.Classes.Ord Data.Org.Row instance GHC.Classes.Eq Data.Org.Row instance GHC.Generics.Generic Data.Org.ListItems instance GHC.Show.Show Data.Org.ListItems instance GHC.Classes.Ord Data.Org.ListItems instance GHC.Classes.Eq Data.Org.ListItems instance GHC.Generics.Generic Data.Org.Item instance GHC.Show.Show Data.Org.Item instance GHC.Classes.Ord Data.Org.Item instance GHC.Classes.Eq Data.Org.Item instance GHC.Generics.Generic Data.Org.Language instance GHC.Show.Show Data.Org.Language instance GHC.Classes.Ord Data.Org.Language instance GHC.Classes.Eq Data.Org.Language instance GHC.Generics.Generic Data.Org.Block instance GHC.Show.Show Data.Org.Block instance GHC.Classes.Ord Data.Org.Block instance GHC.Classes.Eq Data.Org.Block instance GHC.Generics.Generic Data.Org.Section instance GHC.Show.Show Data.Org.Section instance GHC.Classes.Ord Data.Org.Section instance GHC.Classes.Eq Data.Org.Section instance GHC.Generics.Generic Data.Org.OrgDoc instance GHC.Show.Show Data.Org.OrgDoc instance GHC.Classes.Ord Data.Org.OrgDoc instance GHC.Classes.Eq Data.Org.OrgDoc instance GHC.Generics.Generic Data.Org.OrgFile instance GHC.Show.Show Data.Org.OrgFile instance GHC.Classes.Ord Data.Org.OrgFile instance GHC.Classes.Eq Data.Org.OrgFile instance GHC.Classes.Ord Data.Org.OrgDateTime