xml-types 0.3.2 → 0.3.3
raw patch · 2 files changed
+16/−15 lines, 2 files
Files
- lib/Data/XML/Types.hs +14/−13
- xml-types.cabal +2/−2
lib/Data/XML/Types.hs view
@@ -69,11 +69,12 @@ ) where import Control.Monad ((>=>))+import Data.Data (Data)+import Data.Function (on) import Data.Maybe (isJust)+import Data.String (IsString, fromString) import Data.Text (Text) import qualified Data.Text as T-import Data.String (IsString, fromString)-import Data.Function (on) import Data.Typeable (Typeable) data Document = Document@@ -81,44 +82,44 @@ , documentRoot :: Element , documentEpilogue :: [Miscellaneous] }- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) data Prologue = Prologue { prologueBefore :: [Miscellaneous] , prologueDoctype :: Maybe Doctype , prologueAfter :: [Miscellaneous] }- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) data Instruction = Instruction { instructionTarget :: Text , instructionData :: Text }- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) data Miscellaneous = MiscInstruction Instruction | MiscComment Text- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) data Node = NodeElement Element | NodeInstruction Instruction | NodeContent Content | NodeComment Text- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) data Element = Element { elementName :: Name , elementAttributes :: [(Name, [Content])] , elementNodes :: [Node] }- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) data Content = ContentText Text | ContentEntity Text -- ^ For pass-through parsing- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) -- | A fully qualified name. --@@ -140,7 +141,7 @@ , nameNamespace :: Maybe Text , namePrefix :: Maybe Text }- deriving (Show, Typeable)+ deriving (Data, Show, Typeable) instance Eq Name where (==) = (==) `on` (\x -> (nameNamespace x, nameLocalName x))@@ -165,12 +166,12 @@ { doctypeName :: Text , doctypeID :: Maybe ExternalID }- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) data ExternalID = SystemID Text | PublicID Text Text- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) -- | Some XML processing tools are incremental, and work in terms of events -- rather than node trees. The 'Event' type allows a document to be fully@@ -195,7 +196,7 @@ | EventContent Content | EventComment Text | EventCDATA Text- deriving (Show, Eq, Ord, Typeable)+ deriving (Data, Eq, Ord, Show, Typeable) isElement :: Node -> [Element] isElement (NodeElement e) = [e]
xml-types.cabal view
@@ -1,5 +1,5 @@ name: xml-types-version: 0.3.2+version: 0.3.3 synopsis: Basic types for representing XML license: MIT license-file: license.txt@@ -19,7 +19,7 @@ source-repository this type: bazaar location: https://john-millikin.com/branches/xml-types/0.3/- tag: xml-types_0.3.2+ tag: xml-types_0.3.3 library ghc-options: -Wall