( WikiPage
, BlockElement(..)
, InlineElement(..)
+
+ , ListElement(..)
+ , ListType(..)
+ , ListItem
)
where
headingLevel :: !Int
, headingText :: !String
}
+ | HorizontalLine
+ | List !ListElement
+ | LeadingSpaced ![InlineElement]
| Paragraph ![InlineElement]
deriving (Eq, Show)
, linkText :: !(Maybe String)
}
deriving (Eq, Show)
+
+
+data ListElement
+ = ListElement {
+ listType :: !ListType
+ , listItems :: ![ListItem]
+ }
+ deriving (Eq, Show)
+
+
+data ListType
+ = Bullet
+ | Numbered
+ deriving (Eq, Show)
+
+
+type ListItem = [Either ListElement InlineElement]