Module
Data.Text.Format.Org.Types
- Package
- purescript-org-doc
- Repository
- shamansir/purescript-org-doc
#OrgFile Source
data OrgFile
Constructors
OrgFile { doc :: OrgDoc, meta :: OrgKeywords String, props :: OrgProperties String }
Instances
#Block Source
data Block
Constructors
Of BlockKind (NonEmptyArray Words)
IsDrawer Drawer
Footnote String (NonEmptyArray Words)
List ListItems
DetachedItem DetachedListItem
Table (Maybe TableFormat) (NonEmptyArray TableRow)
Paragraph (NonEmptyArray Words)
WithKeyword (OrgKeyword String) Block
HRule
LComment (Array String)
FixedWidth (NonEmptyArray Words)
ClockB { end :: Maybe OrgDateTime, start :: OrgDateTime } Clock
JoinB Block Block
Instances
#Words Source
data Words
Constructors
Marked MarkupKey String
Link LinkTarget (Maybe String)
RawLink LinkTarget
Image ImageSource
RawImage ImageSource
Punct CodePoint
Plain String
Markup String
DateTime { end :: Maybe OrgDateTime, start :: OrgDateTime }
ClockW Clock
DiaryW Diary
FootnoteRef { def :: Maybe String, label :: String }
Break
Entity String
JoinW Words Words
Space Indent Int
EmptyW
Instances
#OrgDateTime Source
newtype OrgDateTime
Constructors
OrgDateTime { active :: Boolean, date :: Date, delay :: Maybe Delay, repeat :: Maybe Repeater, time :: Maybe OrgTimeRange }
Instances
#OrgTimeRange Source
#Repeater Source
#RepeaterMode Source
#Drawer Source
#Planning Source
newtype Planning
Constructors
Planning { closed :: Maybe OrgDateTime, deadline :: Maybe OrgDateTime, scheduled :: Maybe OrgDateTime, timestamp :: Maybe OrgDateTime }
Instances
#Section Source
newtype Section
Constructors
Section { check :: Maybe Check, comment :: Boolean, cookie :: Maybe Cookie, doc :: OrgDoc, drawers :: Array Drawer, heading :: NonEmptyArray Words, level :: Int, logbook :: Maybe LogBook, planning :: Planning, priority :: Maybe Priority, props :: OrgProperties String, tags :: Array String, todo :: Maybe Todo }
#LogBookEntry Source
newtype LogBookEntry
Constructors
LogBookEntry { continuation :: Array (Array Words), subject :: LogBookEntrySubject }
Instances
#DetachedListItem Source
data DetachedListItem
Constructors
DetachedListItem ListType { mbIndent :: Maybe String } ListItemProps (NonEmptyArray Words)
#LinkTarget Source
#ImageSource Source
#JsonOverRow Source
class JsonOverRow :: Row Type -> Type -> Constraint
class JsonOverRow (row :: Row Type) a | a -> row where
Members
Instances
JsonOverRow JsonListItemsRow ListItems
JsonOverRow DiaryRow Diary
JsonOverRow DelayRow Delay
JsonOverRow JsonTimeRow Time
JsonOverRow JsonTimeRangeRow OrgTimeRange
JsonOverRow JsonDateTimeRow OrgDateTime
JsonOverRow PlanningRow Planning
JsonOverRow LogBookEntryRow LogBookEntry
JsonOverRow FileRow OrgFile
JsonOverRow (JsonPropertyRow String) (OrgProperty String)
#JsonOverRowH Source
class JsonOverRowH :: Row Type -> Type -> Constraint
class (JsonOverRow row a) <= JsonOverRowH (row :: Row Type) a | a -> row where
Members
readImplRow :: Foreign -> F a
writeImplRow :: a -> Foreign
Instances
(RowToList row rl, ReadForeignFields rl () row, WriteForeignFields rl row () to, JsonOverRow row a) => JsonOverRowH row a
#JsonOverVariant Source
class JsonOverVariant :: Row Type -> Type -> Constraint
class JsonOverVariant (row :: Row Type) a | a -> row where
Members
readForeign :: Foreign -> F a
toVariant :: a -> Variant row
fromVariant :: Variant row -> a
Instances
JsonOverVariant CheckRow Check
JsonOverVariant LinkTargetRow LinkTarget
JsonOverVariant ImageSourceRow ImageSource
JsonOverVariant BlockKindRow BlockKind
JsonOverVariant BlockRow Block
JsonOverVariant InlineKeyRow InlineKey
JsonOverVariant MarkupKeyRow MarkupKey
JsonOverVariant WordsRow Words
JsonOverVariant CookieRow Cookie
JsonOverVariant PriorityRow Priority
JsonOverVariant TodoRow Todo
JsonOverVariant ListTypeRow ListType
JsonOverVariant IntervalRow Interval
JsonOverVariant RepeaterModeRow RepeaterMode
JsonOverVariant DelayModeRow DelayMode
JsonOverVariant LogBookSubjectRow LogBookEntrySubject
#JsonOverVariantH Source
class JsonOverVariantH :: Row Type -> Type -> Constraint
class (JsonOverVariant row a) <= JsonOverVariantH (row :: Row Type) a | a -> row where
Members
readImplVar :: Foreign -> F a
writeImplVar :: a -> Foreign
Instances
(RowToList row rl, ReadForeignVariant rl row, WriteForeignVariant rl row, JsonOverVariant row a) => JsonOverVariantH row a
#JsonOverNewtype Source
class (Newtype a x) <= JsonOverNewtype a x | a -> x, x -> a where
Members
readImplNT :: Foreign -> F a
writeImplNT :: a -> Foreign
Instances
(ReadForeign x, WriteForeign x, Newtype a x) => JsonOverNewtype a x
#LinkTargetRow Source
type LinkTargetRow :: Row Type
type LinkTargetRow = (heading :: Case1 String, local :: Case1 String, remote :: Case1 String)
Instances
#readLinkTarget Source
readLinkTarget :: Foreign -> F LinkTarget
#ImageSourceRow Source
type ImageSourceRow :: Row Type
type ImageSourceRow = (local :: Case1 String, remote :: Case1 String)
Instances
#readImageSource Source
readImageSource :: Foreign -> F ImageSource
#JsonListItemsRow Source
type JsonListItemsRow :: Row Type
type JsonListItemsRow = (type_ :: Variant ListTypeRow, values :: Array JsonListItem)
Instances
#JsonListItem Source
#convertListItem Source
convertListItem :: Item -> JsonListItem
#loadListItem Source
loadListItem :: JsonListItem -> Item
#detachedFromItem Source
detachedFromItem :: ListType -> Item -> DetachedListItem
#setIndent Source
setIndent :: { indent :: String } -> DetachedListItem -> DetachedListItem
#BlockKindRow Source
#BlockRow Source
type BlockRow :: Row Type
type BlockRow = (clock :: Case3 (Record JsonDateTimeRow) (Maybe (Record JsonDateTimeRow)) (Record ClockRow), comment :: Case1 (Array String), drawer :: Case2 String (Array Words), fixed :: Case1 (Array Words), footnote :: Case2 String (Array Words), hr :: Case, kind :: Case2 BlockKind (Array Words), list :: Case2 (Variant ListTypeRow) (Array JsonListItem), litem :: Case3 (Variant ListTypeRow) { indent :: String } JsonListItem, paragraph :: Case1 (Array Words), table :: Case1 { format :: Maybe String, rows :: JsonRows })
Instances
#toNEA Source
toNEA :: forall a. a -> Array a -> NonEmptyArray a
#importWords Source
importWords :: Array Words -> NonEmptyArray Words
#exportWords Source
exportWords :: NonEmptyArray Words -> Array Words
#InlineKeyRow Source
type InlineKeyRow :: Row Type
type InlineKeyRow = (comment :: Case, html :: Case)
Instances
#MarkupKeyRow Source
#WordsRow Source
type WordsRow :: Row Type
type WordsRow = (break :: Case, clock :: Case1 (Record ClockRow), dateTime :: Case2 (Record JsonDateTimeRow) (Maybe (Record JsonDateTimeRow)), diary :: Case1 (Record DiaryRow), empty :: Case, entity :: Case1 String, fnref :: Case2 String (Maybe String), image :: Case1 ImageSource, imageRaw :: Case1 ImageSource, link :: Case2 LinkTarget (Maybe String), linkRaw :: Case1 LinkTarget, marked :: Case2 (Array (Variant MarkupKeyRow)) String, markup :: Case1 String, plain :: Case1 String, punct :: Case1 Char)
Instances
#PriorityRow Source
type PriorityRow :: Row Type
type PriorityRow = (alpha :: Case1 Char, num :: Case1 Int)
Instances
#ListTypeRow Source
#IntervalRow Source
type IntervalRow :: Row Type
type IntervalRow = (day :: Case, hour :: Case, month :: Case, week :: Case, year :: Case)
Instances
#RepeaterModeRow Source
type RepeaterModeRow :: Row Type
type RepeaterModeRow = (fromToday :: Case, jump :: Case, single :: Case)
Instances
#readRepeaterMode Source
readRepeaterMode :: Foreign -> F RepeaterMode
#DelayModeRow Source
type DelayModeRow :: Row Type
type DelayModeRow = (all :: Case, one :: Case)
Instances
#JsonTimeRow Source
type JsonTimeRow :: Row Type
type JsonTimeRow = (hour :: Int, millisecond :: Int, minute :: Int, second :: Int)
Instances
#convertTime Source
convertTime :: Time -> Record JsonTimeRow
#JsonTimeRangeRow Source
type JsonTimeRangeRow :: Row Type
type JsonTimeRangeRow = (end :: Maybe (Record JsonTimeRow), start :: Record JsonTimeRow)
Instances
#JsonDateTimeRow Source
type JsonDateTimeRow :: Row Type
type JsonDateTimeRow = (active :: Boolean, day :: Int, delay :: Maybe Delay, month :: Int, repeat :: Maybe Repeater, time :: Maybe (Record JsonTimeRangeRow), year :: Int)
Instances
#JsonDateTime Source
#JsonSectionId Source
#PlanningRow Source
type PlanningRow :: Row Type
type PlanningRow = (closed :: Maybe JsonDateTime, deadline :: Maybe JsonDateTime, scheduled :: Maybe JsonDateTime, timestamp :: Maybe JsonDateTime)
Instances
#LogBookSubjectRow Source
type LogBookSubjectRow :: Row Type
type LogBookSubjectRow = (note :: Case1 JsonDateTime, other :: Case2 (Array Words) (Array JsonDateTime), reschedule :: Case2 JsonDateTime JsonDateTime, state :: Case3 (Variant TodoRow) (Variant TodoRow) JsonDateTime)
Instances
#LogBookEntryRow Source
type LogBookEntryRow :: Row Type
type LogBookEntryRow = (continuation :: Array (Array Words), subject :: Variant LogBookSubjectRow)
Instances
#SectionRow Source
type SectionRow :: Row Type
type SectionRow = (check :: Maybe (Variant CheckRow), comment :: Boolean, cookie :: Maybe (Variant CookieRow), doc :: Record DocRow, drawers :: Array Drawer, heading :: Array Words, id :: JsonSectionId, level :: Int, logbook :: Array (Record LogBookEntryRow), planning :: Record PlanningRow, priority :: Maybe (Variant PriorityRow), props :: JsonProperties String, tags :: Array String, todo :: Maybe (Variant TodoRow))
#FileRow Source
type FileRow :: Row Type
type FileRow = (doc :: Record DocRow, meta :: JsonKeywords String, props :: JsonProperties String, sections :: Array { id :: JsonSectionId, section :: Record SectionRow })
Instances
#SectionsMap Source
type SectionsMap = Map JsonSectionId (Record SectionRow)
#sectionsToArray Source
sectionsToArray :: SectionsMap -> Array { id :: JsonSectionId, section :: Record SectionRow }
#sectionsFromArray Source
sectionsFromArray :: Array { id :: JsonSectionId, section :: Record SectionRow } -> SectionsMap
#convertSection Source
convertSection :: JsonSectionId -> Section -> (Record SectionRow) /\ SectionsMap
#loadSection Source
loadSection :: SectionsMap -> Record SectionRow -> Section
#collectSections Source
collectSections :: JsonSectionId -> Array Section -> (Array JsonSectionId) /\ SectionsMap
#convertDoc Source
convertDoc :: JsonSectionId -> OrgDoc -> (Record DocRow) /\ SectionsMap
Centered (NonEmptyArray Words) -- TODO