aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/XML/Light
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-05-11 09:01:36 -0600
committerJohn MacFarlane <jgm@berkeley.edu>2021-05-11 09:01:36 -0600
commita66e50840bdc3c92e661257a4a0c5fec34aa25bc (patch)
tree57d1a775a5584dcb1fc57d6d51d0c0fb48e19fc6 /src/Text/Pandoc/XML/Light
parent2bd5d0cafbe67fa723f49fd2d35d913594fdb935 (diff)
downloadpandoc-a66e50840bdc3c92e661257a4a0c5fec34aa25bc.tar.gz
T.P.XML.Light - add Eq, Ord instances...
for Content, Element, Attr, CDataKind. [API change]
Diffstat (limited to 'src/Text/Pandoc/XML/Light')
-rw-r--r--src/Text/Pandoc/XML/Light/Types.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/XML/Light/Types.hs b/src/Text/Pandoc/XML/Light/Types.hs
index 03fdc2e4d..ba602ac1f 100644
--- a/src/Text/Pandoc/XML/Light/Types.hs
+++ b/src/Text/Pandoc/XML/Light/Types.hs
@@ -53,7 +53,7 @@ type Line = Integer
data Content = Elem Element
| Text CData
| CRef Text
- deriving (Show, Typeable, Data)
+ deriving (Show, Typeable, Data, Ord, Eq)
-- | XML elements
data Element = Element {
@@ -61,7 +61,7 @@ data Element = Element {
elAttribs :: [Attr],
elContent :: [Content],
elLine :: Maybe Line
- } deriving (Show, Typeable, Data)
+ } deriving (Show, Typeable, Data, Ord, Eq)
-- | XML attributes
data Attr = Attr {
@@ -74,13 +74,13 @@ data CData = CData {
cdVerbatim :: CDataKind,
cdData :: Text,
cdLine :: Maybe Line
- } deriving (Show, Typeable, Data)
+ } deriving (Show, Typeable, Data, Ord, Eq)
data CDataKind
= CDataText -- ^ Ordinary character data; pretty printer escapes &, < etc.
| CDataVerbatim -- ^ Unescaped character data; pretty printer embeds it in <![CDATA[..
| CDataRaw -- ^ As-is character data; pretty printer passes it along without any escaping or CDATA wrap-up.
- deriving ( Eq, Show, Typeable, Data )
+ deriving ( Eq, Ord, Show, Typeable, Data )
-- | XML qualified names
data QName = QName {