, ListElement(..)
, ListType(..)
, ListItem
+
+ , Definition(..)
+
+ , CommandType(..)
+ , Attribute
+ , BlockCommand(..)
+ , InlineCommand(..)
)
where
}
| HorizontalLine
| List !ListElement
- | LeadingSpaced ![InlineElement]
+ | DefinitionList ![Definition]
+ | Preformatted ![InlineElement]
| Paragraph ![InlineElement]
+ | Div ![Attribute] ![BlockElement]
+ | BlockCmd !BlockCommand
deriving (Eq, Show)
data InlineElement
= Text !String
+ | Italic ![InlineElement]
+ | Bold ![InlineElement]
| PageLink {
linkPage :: !(Maybe PageName)
, linkFragment :: !(Maybe String)
, linkText :: !(Maybe String)
}
+ | LineBreak ![Attribute]
+ | Span ![Attribute] ![InlineElement]
+ | InlineCmd !InlineCommand
deriving (Eq, Show)
type ListItem = [Either ListElement InlineElement]
+
+
+data Definition
+ = Definition {
+ defTerm :: ![InlineElement]
+ , defDesc :: ![InlineElement]
+ }
+ deriving (Eq, Show)
+
+
+data CommandType
+ = InlineCommandType
+ | BlockCommandType
+
+
+type Attribute = (String, String)
+
+
+data BlockCommand
+ = BlockCommand {
+ bCmdName :: !String
+ , bCmdAttributes :: ![Attribute]
+ , bCmdContents :: ![BlockElement]
+ }
+ deriving (Eq, Show)
+
+
+data InlineCommand
+ = InlineCommand {
+ iCmdName :: !String
+ , iCmdAttributes :: ![Attribute]
+ , iCmdContents :: ![InlineElement]
+ }
+ deriving (Eq, Show)