From 260d2752c56f17c1b4e83711d60aca8a8e6a2c07 Mon Sep 17 00:00:00 2001 From: John Millikin Date: Sun, 15 Jan 2012 12:31:18 -0800 Subject: [PATCH] Add ``Ord`` instances for all types. --- lib/Data/XML/Types.hs | 14 +++++++------- xml-types.cabal | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Data/XML/Types.hs b/lib/Data/XML/Types.hs index b000873..b8a7847 100644 --- a/lib/Data/XML/Types.hs +++ b/lib/Data/XML/Types.hs @@ -79,7 +79,7 @@ data Document = Document , documentRoot :: Element , documentEpilogue :: [Miscellaneous] } - deriving (Show, Eq) + deriving (Show, Eq, Ord) instance Typeable Document where typeOf = typeString "Document" @@ -89,7 +89,7 @@ data Prologue = Prologue , prologueDoctype :: Maybe Doctype , prologueAfter :: [Miscellaneous] } - deriving (Show, Eq) + deriving (Show, Eq, Ord) instance Typeable Prologue where typeOf = typeString "Prologue" @@ -106,7 +106,7 @@ instance Typeable Instruction where data Miscellaneous = MiscInstruction Instruction | MiscComment Text - deriving (Show, Eq) + deriving (Show, Eq, Ord) instance Typeable Miscellaneous where typeOf = typeString "Miscellaneous" @@ -116,7 +116,7 @@ data Node | NodeInstruction Instruction | NodeContent Content | NodeComment Text - deriving (Show, Eq) + deriving (Show, Eq, Ord) instance Typeable Node where typeOf = typeString "Node" @@ -126,7 +126,7 @@ data Element = Element , elementAttributes :: [(Name, [Content])] , elementNodes :: [Node] } - deriving (Show, Eq) + deriving (Show, Eq, Ord) instance Typeable Element where typeOf = typeString "Element" @@ -134,7 +134,7 @@ instance Typeable Element where data Content = ContentText Text | ContentEntity Text -- ^ For pass-through parsing - deriving (Show, Eq) + deriving (Show, Eq, Ord) instance Typeable Content where typeOf = typeString "Content" @@ -223,7 +223,7 @@ data Event | EventContent Content | EventComment Text | EventCDATA Text - deriving (Show, Eq) + deriving (Show, Eq, Ord) instance Typeable Event where typeOf = typeString "Event" diff --git a/xml-types.cabal b/xml-types.cabal index a99a098..11dde3f 100644 --- a/xml-types.cabal +++ b/xml-types.cabal @@ -1,5 +1,5 @@ name: xml-types -version: 0.3 +version: 0.3.1 synopsis: Basic types for representing XML license: MIT license-file: license.txt @@ -19,7 +19,7 @@ source-repository head source-repository this type: bazaar location: https://john-millikin.com/branches/xml-types/0.3/ - tag: xml-types_0.3 + tag: xml-types_0.3.1 library ghc-options: -Wall -- 2.34.2