, ListItem
, Definition(..)
+
+ , CommandType(..)
+ , Attribute
+ , BlockCommand(..)
+ , InlineCommand(..)
)
where
| DefinitionList ![Definition]
| Preformatted ![InlineElement]
| Paragraph ![InlineElement]
+ | Div ![Attribute] ![BlockElement]
+ | BlockCmd !BlockCommand
deriving (Eq, Show)
, linkFragment :: !(Maybe String)
, linkText :: !(Maybe String)
}
+ | LineBreak ![Attribute]
+ | Span ![Attribute] ![InlineElement]
+ | Image ![Attribute]
+ | Anchor ![Attribute] ![InlineElement]
+ | InlineCmd !InlineCommand
deriving (Eq, Show)
defTerm :: ![InlineElement]
, defDesc :: ![InlineElement]
}
- deriving (Eq, Show)
\ No newline at end of file
+ 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)