    module Text.XML.HaXml.Schema.XSDTypeModel
      ( module Text.XML.HaXml.Schema.XSDTypeModel
      ) where

    import Data.Semigroup (Semigroup (..))
    import Data.Monoid (Monoid (..))
    import Text.XML.HaXml.Types      (Name,Namespace,QName)

    data Schema        = Schema
                       --  { schema_annotation           :: Annotation
                           { Schema -> QForm
    schema_elementFormDefault   :: QForm
                           , Schema -> QForm
    schema_attributeFormDefault :: QForm
                           , Schema -> Maybe Final
    schema_finalDefault         :: Maybe Final
                           , Schema -> Maybe Final
    schema_blockDefault         :: Maybe Block
                           , Schema -> Maybe TargetNamespace
    schema_targetNamespace      :: Maybe TargetNamespace
                           , Schema -> Maybe TargetNamespace
    schema_version              :: Maybe String
                           , Schema -> [Namespace]
    schema_namespaces           :: [Namespace]
                           , Schema -> [SchemaItem]
    schema_items                :: [SchemaItem]
                           }
                         deriving (Schema -> Schema -> Bool
    (Schema -> Schema -> Bool)
    -> (Schema -> Schema -> Bool) -> Eq Schema
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Schema -> Schema -> Bool
    == :: Schema -> Schema -> Bool
    $c/= :: Schema -> Schema -> Bool
    /= :: Schema -> Schema -> Bool
    Eq,Int -> Schema -> ShowS
    [Schema] -> ShowS
    Schema -> TargetNamespace
    (Int -> Schema -> ShowS)
    -> (Schema -> TargetNamespace)
    -> ([Schema] -> ShowS)
    -> Show Schema
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Schema -> ShowS
    showsPrec :: Int -> Schema -> ShowS
    $cshow :: Schema -> TargetNamespace
    show :: Schema -> TargetNamespace
    $cshowList :: [Schema] -> ShowS
    showList :: [Schema] -> ShowS
    Show)
    data SchemaItem    = Include    SchemaLocation Annotation
                       | Import URI SchemaLocation Annotation
                       | Redefine   SchemaLocation [SchemaItem]
                       | Annotation Annotation
                       --
                       | Simple          SimpleType
                       | Complex         ComplexType
                       | SchemaElement   ElementDecl
                       | SchemaAttribute AttributeDecl
                       | AttributeGroup  AttrGroup
                       | SchemaGroup     Group
                   --  | Notation        Name
                         deriving (SchemaItem -> SchemaItem -> Bool
    (SchemaItem -> SchemaItem -> Bool)
    -> (SchemaItem -> SchemaItem -> Bool) -> Eq SchemaItem
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: SchemaItem -> SchemaItem -> Bool
    == :: SchemaItem -> SchemaItem -> Bool
    $c/= :: SchemaItem -> SchemaItem -> Bool
    /= :: SchemaItem -> SchemaItem -> Bool
    Eq,Int -> SchemaItem -> ShowS
    [SchemaItem] -> ShowS
    SchemaItem -> TargetNamespace
    (Int -> SchemaItem -> ShowS)
    -> (SchemaItem -> TargetNamespace)
    -> ([SchemaItem] -> ShowS)
    -> Show SchemaItem
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> SchemaItem -> ShowS
    showsPrec :: Int -> SchemaItem -> ShowS
    $cshow :: SchemaItem -> TargetNamespace
    show :: SchemaItem -> TargetNamespace
    $cshowList :: [SchemaItem] -> ShowS
    showList :: [SchemaItem] -> ShowS
    Show)

    -- The "simple type" model

    data SimpleType    = Primitive  { SimpleType -> PrimitiveType
    simple_primitive   :: PrimitiveType }
                       | Restricted { SimpleType -> Annotation
    simple_annotation  :: Annotation
                                    , SimpleType -> Maybe TargetNamespace
    simple_name        :: Maybe Name
                                    , SimpleType -> Maybe Final
    simple_final       :: Maybe Final
                                    , SimpleType -> Restriction
    simple_restriction :: Restriction
                                    }
                       | ListOf     { simple_annotation  :: Annotation
                                    , simple_name        :: Maybe Name
                                    , simple_final       :: Maybe Final
                                      -- simpletype = element, qname = attribute
                                    , SimpleType -> Either SimpleType QName
    simple_type        :: Either SimpleType QName
                                    }
                       | UnionOf    { simple_annotation  :: Annotation
                                    , simple_name        :: Maybe Name
                                    , simple_final       :: Maybe Final
                                      -- union = elements
                                    , SimpleType -> [SimpleType]
    simple_union       :: [SimpleType]
                                      -- members = attribute
                                    , SimpleType -> [QName]
    simple_members     :: [QName]
                                    }
                         deriving (SimpleType -> SimpleType -> Bool
    (SimpleType -> SimpleType -> Bool)
    -> (SimpleType -> SimpleType -> Bool) -> Eq SimpleType
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: SimpleType -> SimpleType -> Bool
    == :: SimpleType -> SimpleType -> Bool
    $c/= :: SimpleType -> SimpleType -> Bool
    /= :: SimpleType -> SimpleType -> Bool
    Eq,Int -> SimpleType -> ShowS
    [SimpleType] -> ShowS
    SimpleType -> TargetNamespace
    (Int -> SimpleType -> ShowS)
    -> (SimpleType -> TargetNamespace)
    -> ([SimpleType] -> ShowS)
    -> Show SimpleType
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> SimpleType -> ShowS
    showsPrec :: Int -> SimpleType -> ShowS
    $cshow :: SimpleType -> TargetNamespace
    show :: SimpleType -> TargetNamespace
    $cshowList :: [SimpleType] -> ShowS
    showList :: [SimpleType] -> ShowS
    Show)

    data Restriction   = RestrictSim1 { Restriction -> Annotation
    restrict_annotation :: Annotation
                                      , Restriction -> Maybe QName
    restrict_base       :: Maybe QName
                                      , Restriction -> Restriction1
    restrict_r1         :: Restriction1
                                      }
                       | RestrictType { restrict_annotation :: Annotation
                                      , restrict_base       :: Maybe QName
                                      , Restriction -> Maybe SimpleType
    restrict_type       :: Maybe SimpleType
                                      , Restriction -> [Facet]
    restrict_facets     :: [Facet]
                                      }
                         deriving (Restriction -> Restriction -> Bool
    (Restriction -> Restriction -> Bool)
    -> (Restriction -> Restriction -> Bool) -> Eq Restriction
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Restriction -> Restriction -> Bool
    == :: Restriction -> Restriction -> Bool
    $c/= :: Restriction -> Restriction -> Bool
    /= :: Restriction -> Restriction -> Bool
    Eq,Int -> Restriction -> ShowS
    [Restriction] -> ShowS
    Restriction -> TargetNamespace
    (Int -> Restriction -> ShowS)
    -> (Restriction -> TargetNamespace)
    -> ([Restriction] -> ShowS)
    -> Show Restriction
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Restriction -> ShowS
    showsPrec :: Int -> Restriction -> ShowS
    $cshow :: Restriction -> TargetNamespace
    show :: Restriction -> TargetNamespace
    $cshowList :: [Restriction] -> ShowS
    showList :: [Restriction] -> ShowS
    Show)

    data Facet         = Facet { Facet -> FacetType
    facet_facetType  :: FacetType
                               , Facet -> Annotation
    facet_annotation :: Annotation
                               , Facet -> TargetNamespace
    facet_facetValue :: String
                               , Facet -> Bool
    facet_fixed      :: Bool
                               }
                         deriving (Facet -> Facet -> Bool
    (Facet -> Facet -> Bool) -> (Facet -> Facet -> Bool) -> Eq Facet
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Facet -> Facet -> Bool
    == :: Facet -> Facet -> Bool
    $c/= :: Facet -> Facet -> Bool
    /= :: Facet -> Facet -> Bool
    Eq,Int -> Facet -> ShowS
    [Facet] -> ShowS
    Facet -> TargetNamespace
    (Int -> Facet -> ShowS)
    -> (Facet -> TargetNamespace) -> ([Facet] -> ShowS) -> Show Facet
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Facet -> ShowS
    showsPrec :: Int -> Facet -> ShowS
    $cshow :: Facet -> TargetNamespace
    show :: Facet -> TargetNamespace
    $cshowList :: [Facet] -> ShowS
    showList :: [Facet] -> ShowS
    Show)

    data FacetType     = OrderedBoundsMinIncl
                       | OrderedBoundsMinExcl
                       | OrderedBoundsMaxIncl
                       | OrderedBoundsMaxExcl
                       | OrderedNumericTotalDigits
                       | OrderedNumericFractionDigits
                       | UnorderedPattern
                       | UnorderedEnumeration
                       | UnorderedWhitespace
                       | UnorderedLength
                       | UnorderedMaxLength
                       | UnorderedMinLength
                         deriving (FacetType -> FacetType -> Bool
    (FacetType -> FacetType -> Bool)
    -> (FacetType -> FacetType -> Bool) -> Eq FacetType
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: FacetType -> FacetType -> Bool
    == :: FacetType -> FacetType -> Bool
    $c/= :: FacetType -> FacetType -> Bool
    /= :: FacetType -> FacetType -> Bool
    Eq,Int -> FacetType -> ShowS
    [FacetType] -> ShowS
    FacetType -> TargetNamespace
    (Int -> FacetType -> ShowS)
    -> (FacetType -> TargetNamespace)
    -> ([FacetType] -> ShowS)
    -> Show FacetType
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> FacetType -> ShowS
    showsPrec :: Int -> FacetType -> ShowS
    $cshow :: FacetType -> TargetNamespace
    show :: FacetType -> TargetNamespace
    $cshowList :: [FacetType] -> ShowS
    showList :: [FacetType] -> ShowS
    Show)

    -- The "complex type" model

    data ComplexType   = ComplexType
                           { ComplexType -> Annotation
    complex_annotation :: Annotation
                           , ComplexType -> Maybe TargetNamespace
    complex_name       :: Maybe Name
                           , ComplexType -> Bool
    complex_abstract   :: Bool
                           , ComplexType -> Maybe Final
    complex_final      :: Maybe Final
                           , ComplexType -> Maybe Final
    complex_block      :: Maybe Block
                           , ComplexType -> Bool
    complex_mixed      :: Bool
                           , ComplexType -> ComplexItem
    complex_content    :: ComplexItem
                           }
                         deriving (ComplexType -> ComplexType -> Bool
    (ComplexType -> ComplexType -> Bool)
    -> (ComplexType -> ComplexType -> Bool) -> Eq ComplexType
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ComplexType -> ComplexType -> Bool
    == :: ComplexType -> ComplexType -> Bool
    $c/= :: ComplexType -> ComplexType -> Bool
    /= :: ComplexType -> ComplexType -> Bool
    Eq,Int -> ComplexType -> ShowS
    [ComplexType] -> ShowS
    ComplexType -> TargetNamespace
    (Int -> ComplexType -> ShowS)
    -> (ComplexType -> TargetNamespace)
    -> ([ComplexType] -> ShowS)
    -> Show ComplexType
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ComplexType -> ShowS
    showsPrec :: Int -> ComplexType -> ShowS
    $cshow :: ComplexType -> TargetNamespace
    show :: ComplexType -> TargetNamespace
    $cshowList :: [ComplexType] -> ShowS
    showList :: [ComplexType] -> ShowS
    Show)
    data ComplexItem   = SimpleContent
                           { ComplexItem -> Annotation
    ci_annotation :: Annotation
                           , ComplexItem -> Either Restriction1 Extension
    ci_stuff      :: Either Restriction1 Extension
                           }
                       | ComplexContent
                           { ci_annotation :: Annotation
                           , ComplexItem -> Bool
    ci_mixed      :: Bool
                           , ci_stuff      :: Either Restriction1 Extension
                           }
                       | ThisType
                           { ComplexItem -> ParticleAttrs
    ci_thistype   :: ParticleAttrs
                           }
                         deriving (ComplexItem -> ComplexItem -> Bool
    (ComplexItem -> ComplexItem -> Bool)
    -> (ComplexItem -> ComplexItem -> Bool) -> Eq ComplexItem
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ComplexItem -> ComplexItem -> Bool
    == :: ComplexItem -> ComplexItem -> Bool
    $c/= :: ComplexItem -> ComplexItem -> Bool
    /= :: ComplexItem -> ComplexItem -> Bool
    Eq,Int -> ComplexItem -> ShowS
    [ComplexItem] -> ShowS
    ComplexItem -> TargetNamespace
    (Int -> ComplexItem -> ShowS)
    -> (ComplexItem -> TargetNamespace)
    -> ([ComplexItem] -> ShowS)
    -> Show ComplexItem
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ComplexItem -> ShowS
    showsPrec :: Int -> ComplexItem -> ShowS
    $cshow :: ComplexItem -> TargetNamespace
    show :: ComplexItem -> TargetNamespace
    $cshowList :: [ComplexItem] -> ShowS
    showList :: [ComplexItem] -> ShowS
    Show)

    data Restriction1  = Restriction1 Particle
                         deriving (Restriction1 -> Restriction1 -> Bool
    (Restriction1 -> Restriction1 -> Bool)
    -> (Restriction1 -> Restriction1 -> Bool) -> Eq Restriction1
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Restriction1 -> Restriction1 -> Bool
    == :: Restriction1 -> Restriction1 -> Bool
    $c/= :: Restriction1 -> Restriction1 -> Bool
    /= :: Restriction1 -> Restriction1 -> Bool
    Eq,Int -> Restriction1 -> ShowS
    [Restriction1] -> ShowS
    Restriction1 -> TargetNamespace
    (Int -> Restriction1 -> ShowS)
    -> (Restriction1 -> TargetNamespace)
    -> ([Restriction1] -> ShowS)
    -> Show Restriction1
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Restriction1 -> ShowS
    showsPrec :: Int -> Restriction1 -> ShowS
    $cshow :: Restriction1 -> TargetNamespace
    show :: Restriction1 -> TargetNamespace
    $cshowList :: [Restriction1] -> ShowS
    showList :: [Restriction1] -> ShowS
    Show)
    data Extension     = Extension
                           { Extension -> Annotation
    extension_annotation :: Annotation
                           , Extension -> QName
    extension_base       :: QName
                           , Extension -> ParticleAttrs
    extension_newstuff   :: ParticleAttrs
                           }
                         deriving (Extension -> Extension -> Bool
    (Extension -> Extension -> Bool)
    -> (Extension -> Extension -> Bool) -> Eq Extension
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Extension -> Extension -> Bool
    == :: Extension -> Extension -> Bool
    $c/= :: Extension -> Extension -> Bool
    /= :: Extension -> Extension -> Bool
    Eq,Int -> Extension -> ShowS
    [Extension] -> ShowS
    Extension -> TargetNamespace
    (Int -> Extension -> ShowS)
    -> (Extension -> TargetNamespace)
    -> ([Extension] -> ShowS)
    -> Show Extension
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Extension -> ShowS
    showsPrec :: Int -> Extension -> ShowS
    $cshow :: Extension -> TargetNamespace
    show :: Extension -> TargetNamespace
    $cshowList :: [Extension] -> ShowS
    showList :: [Extension] -> ShowS
    Show)

    type Particle      = Maybe (Either ChoiceOrSeq Group)
    data ParticleAttrs = PA Particle [Either AttributeDecl AttrGroup]
                            (Maybe AnyAttr)
                         deriving (ParticleAttrs -> ParticleAttrs -> Bool
    (ParticleAttrs -> ParticleAttrs -> Bool)
    -> (ParticleAttrs -> ParticleAttrs -> Bool) -> Eq ParticleAttrs
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ParticleAttrs -> ParticleAttrs -> Bool
    == :: ParticleAttrs -> ParticleAttrs -> Bool
    $c/= :: ParticleAttrs -> ParticleAttrs -> Bool
    /= :: ParticleAttrs -> ParticleAttrs -> Bool
    Eq,Int -> ParticleAttrs -> ShowS
    [ParticleAttrs] -> ShowS
    ParticleAttrs -> TargetNamespace
    (Int -> ParticleAttrs -> ShowS)
    -> (ParticleAttrs -> TargetNamespace)
    -> ([ParticleAttrs] -> ShowS)
    -> Show ParticleAttrs
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ParticleAttrs -> ShowS
    showsPrec :: Int -> ParticleAttrs -> ShowS
    $cshow :: ParticleAttrs -> TargetNamespace
    show :: ParticleAttrs -> TargetNamespace
    $cshowList :: [ParticleAttrs] -> ShowS
    showList :: [ParticleAttrs] -> ShowS
    Show)
    data Group         = Group
                           { Group -> Annotation
    group_annotation :: Annotation
                           , Group -> Either TargetNamespace QName
    group_nameOrRef  :: Either Name QName
                           , Group -> Occurs
    group_occurs     :: Occurs
                           , Group -> Maybe ChoiceOrSeq
    group_stuff      :: Maybe ChoiceOrSeq
                           }
                         deriving (Group -> Group -> Bool
    (Group -> Group -> Bool) -> (Group -> Group -> Bool) -> Eq Group
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Group -> Group -> Bool
    == :: Group -> Group -> Bool
    $c/= :: Group -> Group -> Bool
    /= :: Group -> Group -> Bool
    Eq,Int -> Group -> ShowS
    [Group] -> ShowS
    Group -> TargetNamespace
    (Int -> Group -> ShowS)
    -> (Group -> TargetNamespace) -> ([Group] -> ShowS) -> Show Group
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Group -> ShowS
    showsPrec :: Int -> Group -> ShowS
    $cshow :: Group -> TargetNamespace
    show :: Group -> TargetNamespace
    $cshowList :: [Group] -> ShowS
    showList :: [Group] -> ShowS
    Show)

    data ChoiceOrSeq   = All      Annotation [ElementDecl]
                       | Choice   Annotation Occurs [ElementEtc]
                       | Sequence Annotation Occurs [ElementEtc]
                         deriving (ChoiceOrSeq -> ChoiceOrSeq -> Bool
    (ChoiceOrSeq -> ChoiceOrSeq -> Bool)
    -> (ChoiceOrSeq -> ChoiceOrSeq -> Bool) -> Eq ChoiceOrSeq
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ChoiceOrSeq -> ChoiceOrSeq -> Bool
    == :: ChoiceOrSeq -> ChoiceOrSeq -> Bool
    $c/= :: ChoiceOrSeq -> ChoiceOrSeq -> Bool
    /= :: ChoiceOrSeq -> ChoiceOrSeq -> Bool
    Eq,Int -> ChoiceOrSeq -> ShowS
    [ChoiceOrSeq] -> ShowS
    ChoiceOrSeq -> TargetNamespace
    (Int -> ChoiceOrSeq -> ShowS)
    -> (ChoiceOrSeq -> TargetNamespace)
    -> ([ChoiceOrSeq] -> ShowS)
    -> Show ChoiceOrSeq
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ChoiceOrSeq -> ShowS
    showsPrec :: Int -> ChoiceOrSeq -> ShowS
    $cshow :: ChoiceOrSeq -> TargetNamespace
    show :: ChoiceOrSeq -> TargetNamespace
    $cshowList :: [ChoiceOrSeq] -> ShowS
    showList :: [ChoiceOrSeq] -> ShowS
    Show)
    data ElementEtc    = HasElement ElementDecl
                       | HasGroup   Group
                       | HasCS      ChoiceOrSeq
                       | HasAny     Any
                         deriving (ElementEtc -> ElementEtc -> Bool
    (ElementEtc -> ElementEtc -> Bool)
    -> (ElementEtc -> ElementEtc -> Bool) -> Eq ElementEtc
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ElementEtc -> ElementEtc -> Bool
    == :: ElementEtc -> ElementEtc -> Bool
    $c/= :: ElementEtc -> ElementEtc -> Bool
    /= :: ElementEtc -> ElementEtc -> Bool
    Eq,Int -> ElementEtc -> ShowS
    [ElementEtc] -> ShowS
    ElementEtc -> TargetNamespace
    (Int -> ElementEtc -> ShowS)
    -> (ElementEtc -> TargetNamespace)
    -> ([ElementEtc] -> ShowS)
    -> Show ElementEtc
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ElementEtc -> ShowS
    showsPrec :: Int -> ElementEtc -> ShowS
    $cshow :: ElementEtc -> TargetNamespace
    show :: ElementEtc -> TargetNamespace
    $cshowList :: [ElementEtc] -> ShowS
    showList :: [ElementEtc] -> ShowS
    Show)

    data Any           = Any
                           { Any -> Annotation
    any_annotation      :: Annotation
                           , Any -> TargetNamespace
    any_namespace       :: URI
                           , Any -> ProcessContents
    any_processContents :: ProcessContents
                           , Any -> Occurs
    any_occurs          :: Occurs
                           }
                         deriving (Any -> Any -> Bool
    (Any -> Any -> Bool) -> (Any -> Any -> Bool) -> Eq Any
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Any -> Any -> Bool
    == :: Any -> Any -> Bool
    $c/= :: Any -> Any -> Bool
    /= :: Any -> Any -> Bool
    Eq,Int -> Any -> ShowS
    [Any] -> ShowS
    Any -> TargetNamespace
    (Int -> Any -> ShowS)
    -> (Any -> TargetNamespace) -> ([Any] -> ShowS) -> Show Any
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Any -> ShowS
    showsPrec :: Int -> Any -> ShowS
    $cshow :: Any -> TargetNamespace
    show :: Any -> TargetNamespace
    $cshowList :: [Any] -> ShowS
    showList :: [Any] -> ShowS
    Show)
    data AnyAttr       = AnyAttr
                           { AnyAttr -> Annotation
    anyattr_annotation      :: Annotation
                           , AnyAttr -> TargetNamespace
    anyattr_namespace       :: URI
                           , AnyAttr -> ProcessContents
    anyattr_processContents :: ProcessContents
                           }
                         deriving (AnyAttr -> AnyAttr -> Bool
    (AnyAttr -> AnyAttr -> Bool)
    -> (AnyAttr -> AnyAttr -> Bool) -> Eq AnyAttr
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: AnyAttr -> AnyAttr -> Bool
    == :: AnyAttr -> AnyAttr -> Bool
    $c/= :: AnyAttr -> AnyAttr -> Bool
    /= :: AnyAttr -> AnyAttr -> Bool
    Eq,Int -> AnyAttr -> ShowS
    [AnyAttr] -> ShowS
    AnyAttr -> TargetNamespace
    (Int -> AnyAttr -> ShowS)
    -> (AnyAttr -> TargetNamespace)
    -> ([AnyAttr] -> ShowS)
    -> Show AnyAttr
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> AnyAttr -> ShowS
    showsPrec :: Int -> AnyAttr -> ShowS
    $cshow :: AnyAttr -> TargetNamespace
    show :: AnyAttr -> TargetNamespace
    $cshowList :: [AnyAttr] -> ShowS
    showList :: [AnyAttr] -> ShowS
    Show)

    data AttrGroup     = AttrGroup
                           { AttrGroup -> Annotation
    attrgroup_annotation :: Annotation
                           , AttrGroup -> Either TargetNamespace QName
    attrgroup_nameOrRef  :: Either Name QName
                           , AttrGroup -> [Either AttributeDecl AttrGroup]
    attrgroup_stuff      :: [Either AttributeDecl
                                                             AttrGroup]
                           }
                         deriving (AttrGroup -> AttrGroup -> Bool
    (AttrGroup -> AttrGroup -> Bool)
    -> (AttrGroup -> AttrGroup -> Bool) -> Eq AttrGroup
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: AttrGroup -> AttrGroup -> Bool
    == :: AttrGroup -> AttrGroup -> Bool
    $c/= :: AttrGroup -> AttrGroup -> Bool
    /= :: AttrGroup -> AttrGroup -> Bool
    Eq,Int -> AttrGroup -> ShowS
    [AttrGroup] -> ShowS
    AttrGroup -> TargetNamespace
    (Int -> AttrGroup -> ShowS)
    -> (AttrGroup -> TargetNamespace)
    -> ([AttrGroup] -> ShowS)
    -> Show AttrGroup
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> AttrGroup -> ShowS
    showsPrec :: Int -> AttrGroup -> ShowS
    $cshow :: AttrGroup -> TargetNamespace
    show :: AttrGroup -> TargetNamespace
    $cshowList :: [AttrGroup] -> ShowS
    showList :: [AttrGroup] -> ShowS
    Show)

    data ElementDecl   = ElementDecl
                           { ElementDecl -> Annotation
    elem_annotation :: Annotation
                           , ElementDecl -> Either NameAndType QName
    elem_nameOrRef  :: Either NameAndType QName
                           , ElementDecl -> Occurs
    elem_occurs     :: Occurs
                           , ElementDecl -> Bool
    elem_nillable   :: Nillable
                           , ElementDecl -> Maybe QName
    elem_substGroup :: Maybe QName
                           , ElementDecl -> Bool
    elem_abstract   :: Bool
                           , ElementDecl -> Maybe Final
    elem_final      :: Maybe Final
                           , ElementDecl -> Maybe Final
    elem_block      :: Maybe Block
                           , ElementDecl -> QForm
    elem_form       :: QForm
                           , ElementDecl -> Maybe (Either SimpleType ComplexType)
    elem_content    :: Maybe (Either SimpleType
                                                              ComplexType)
                           , ElementDecl -> [UniqueKeyOrKeyRef]
    elem_stuff      :: [ UniqueKeyOrKeyRef ]
                           }
                         deriving (ElementDecl -> ElementDecl -> Bool
    (ElementDecl -> ElementDecl -> Bool)
    -> (ElementDecl -> ElementDecl -> Bool) -> Eq ElementDecl
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ElementDecl -> ElementDecl -> Bool
    == :: ElementDecl -> ElementDecl -> Bool
    $c/= :: ElementDecl -> ElementDecl -> Bool
    /= :: ElementDecl -> ElementDecl -> Bool
    Eq,Int -> ElementDecl -> ShowS
    [ElementDecl] -> ShowS
    ElementDecl -> TargetNamespace
    (Int -> ElementDecl -> ShowS)
    -> (ElementDecl -> TargetNamespace)
    -> ([ElementDecl] -> ShowS)
    -> Show ElementDecl
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ElementDecl -> ShowS
    showsPrec :: Int -> ElementDecl -> ShowS
    $cshow :: ElementDecl -> TargetNamespace
    show :: ElementDecl -> TargetNamespace
    $cshowList :: [ElementDecl] -> ShowS
    showList :: [ElementDecl] -> ShowS
    Show)
    data NameAndType   = NT { NameAndType -> TargetNamespace
    theName :: Name, NameAndType -> Maybe QName
    theType :: Maybe QName }
                         deriving (NameAndType -> NameAndType -> Bool
    (NameAndType -> NameAndType -> Bool)
    -> (NameAndType -> NameAndType -> Bool) -> Eq NameAndType
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: NameAndType -> NameAndType -> Bool
    == :: NameAndType -> NameAndType -> Bool
    $c/= :: NameAndType -> NameAndType -> Bool
    /= :: NameAndType -> NameAndType -> Bool
    Eq,Int -> NameAndType -> ShowS
    [NameAndType] -> ShowS
    NameAndType -> TargetNamespace
    (Int -> NameAndType -> ShowS)
    -> (NameAndType -> TargetNamespace)
    -> ([NameAndType] -> ShowS)
    -> Show NameAndType
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> NameAndType -> ShowS
    showsPrec :: Int -> NameAndType -> ShowS
    $cshow :: NameAndType -> TargetNamespace
    show :: NameAndType -> TargetNamespace
    $cshowList :: [NameAndType] -> ShowS
    showList :: [NameAndType] -> ShowS
    Show)

    data AttributeDecl = AttributeDecl
                           { AttributeDecl -> Annotation
    attr_annotation :: Annotation
                           , AttributeDecl -> Either NameAndType QName
    attr_nameOrRef  :: Either NameAndType QName
                           , AttributeDecl -> Use
    attr_use        :: Use
                           , AttributeDecl -> Maybe (Either TargetNamespace TargetNamespace)
    attr_defFixed   :: Maybe (Either DefaultValue
                                                              FixedValue)
                           , AttributeDecl -> QForm
    attr_form       :: QForm
                           , AttributeDecl -> Maybe SimpleType
    attr_simpleType :: Maybe SimpleType
                           }
                         deriving (AttributeDecl -> AttributeDecl -> Bool
    (AttributeDecl -> AttributeDecl -> Bool)
    -> (AttributeDecl -> AttributeDecl -> Bool) -> Eq AttributeDecl
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: AttributeDecl -> AttributeDecl -> Bool
    == :: AttributeDecl -> AttributeDecl -> Bool
    $c/= :: AttributeDecl -> AttributeDecl -> Bool
    /= :: AttributeDecl -> AttributeDecl -> Bool
    Eq,Int -> AttributeDecl -> ShowS
    [AttributeDecl] -> ShowS
    AttributeDecl -> TargetNamespace
    (Int -> AttributeDecl -> ShowS)
    -> (AttributeDecl -> TargetNamespace)
    -> ([AttributeDecl] -> ShowS)
    -> Show AttributeDecl
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> AttributeDecl -> ShowS
    showsPrec :: Int -> AttributeDecl -> ShowS
    $cshow :: AttributeDecl -> TargetNamespace
    show :: AttributeDecl -> TargetNamespace
    $cshowList :: [AttributeDecl] -> ShowS
    showList :: [AttributeDecl] -> ShowS
    Show)

    data UniqueKeyOrKeyRef
                       = U  Unique
                       | K  Key
                       | KR KeyRef
                         deriving (UniqueKeyOrKeyRef -> UniqueKeyOrKeyRef -> Bool
    (UniqueKeyOrKeyRef -> UniqueKeyOrKeyRef -> Bool)
    -> (UniqueKeyOrKeyRef -> UniqueKeyOrKeyRef -> Bool)
    -> Eq UniqueKeyOrKeyRef
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: UniqueKeyOrKeyRef -> UniqueKeyOrKeyRef -> Bool
    == :: UniqueKeyOrKeyRef -> UniqueKeyOrKeyRef -> Bool
    $c/= :: UniqueKeyOrKeyRef -> UniqueKeyOrKeyRef -> Bool
    /= :: UniqueKeyOrKeyRef -> UniqueKeyOrKeyRef -> Bool
    Eq,Int -> UniqueKeyOrKeyRef -> ShowS
    [UniqueKeyOrKeyRef] -> ShowS
    UniqueKeyOrKeyRef -> TargetNamespace
    (Int -> UniqueKeyOrKeyRef -> ShowS)
    -> (UniqueKeyOrKeyRef -> TargetNamespace)
    -> ([UniqueKeyOrKeyRef] -> ShowS)
    -> Show UniqueKeyOrKeyRef
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> UniqueKeyOrKeyRef -> ShowS
    showsPrec :: Int -> UniqueKeyOrKeyRef -> ShowS
    $cshow :: UniqueKeyOrKeyRef -> TargetNamespace
    show :: UniqueKeyOrKeyRef -> TargetNamespace
    $cshowList :: [UniqueKeyOrKeyRef] -> ShowS
    showList :: [UniqueKeyOrKeyRef] -> ShowS
    Show)

    data Unique        = Unique
                           { Unique -> Annotation
    unique_annotation :: Annotation
                           , Unique -> TargetNamespace
    unique_name       :: Name
                           , Unique -> Selector
    unique_selector   :: Selector
                           , Unique -> [Field]
    unique_fields     :: [Field]
                           }
                         deriving (Unique -> Unique -> Bool
    (Unique -> Unique -> Bool)
    -> (Unique -> Unique -> Bool) -> Eq Unique
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Unique -> Unique -> Bool
    == :: Unique -> Unique -> Bool
    $c/= :: Unique -> Unique -> Bool
    /= :: Unique -> Unique -> Bool
    Eq,Int -> Unique -> ShowS
    [Unique] -> ShowS
    Unique -> TargetNamespace
    (Int -> Unique -> ShowS)
    -> (Unique -> TargetNamespace)
    -> ([Unique] -> ShowS)
    -> Show Unique
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Unique -> ShowS
    showsPrec :: Int -> Unique -> ShowS
    $cshow :: Unique -> TargetNamespace
    show :: Unique -> TargetNamespace
    $cshowList :: [Unique] -> ShowS
    showList :: [Unique] -> ShowS
    Show)
    data Key           = Key
                           { Key -> Annotation
    key_annotation :: Annotation
                           , Key -> TargetNamespace
    key_name       :: Name
                           , Key -> Selector
    key_selector   :: Selector
                           , Key -> [Field]
    key_fields     :: [Field]
                           }
                         deriving (Key -> Key -> Bool
    (Key -> Key -> Bool) -> (Key -> Key -> Bool) -> Eq Key
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Key -> Key -> Bool
    == :: Key -> Key -> Bool
    $c/= :: Key -> Key -> Bool
    /= :: Key -> Key -> Bool
    Eq,Int -> Key -> ShowS
    [Key] -> ShowS
    Key -> TargetNamespace
    (Int -> Key -> ShowS)
    -> (Key -> TargetNamespace) -> ([Key] -> ShowS) -> Show Key
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Key -> ShowS
    showsPrec :: Int -> Key -> ShowS
    $cshow :: Key -> TargetNamespace
    show :: Key -> TargetNamespace
    $cshowList :: [Key] -> ShowS
    showList :: [Key] -> ShowS
    Show)
    data KeyRef        = KeyRef
                           { KeyRef -> Annotation
    keyref_annotation :: Annotation
                           , KeyRef -> TargetNamespace
    keyref_name       :: Name
                           , KeyRef -> QName
    keyref_refer      :: QName
                           , KeyRef -> Selector
    keyref_selector   :: Selector
                           , KeyRef -> [Field]
    keyref_fields     :: [Field]
                           }
                         deriving (KeyRef -> KeyRef -> Bool
    (KeyRef -> KeyRef -> Bool)
    -> (KeyRef -> KeyRef -> Bool) -> Eq KeyRef
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: KeyRef -> KeyRef -> Bool
    == :: KeyRef -> KeyRef -> Bool
    $c/= :: KeyRef -> KeyRef -> Bool
    /= :: KeyRef -> KeyRef -> Bool
    Eq,Int -> KeyRef -> ShowS
    [KeyRef] -> ShowS
    KeyRef -> TargetNamespace
    (Int -> KeyRef -> ShowS)
    -> (KeyRef -> TargetNamespace)
    -> ([KeyRef] -> ShowS)
    -> Show KeyRef
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> KeyRef -> ShowS
    showsPrec :: Int -> KeyRef -> ShowS
    $cshow :: KeyRef -> TargetNamespace
    show :: KeyRef -> TargetNamespace
    $cshowList :: [KeyRef] -> ShowS
    showList :: [KeyRef] -> ShowS
    Show)
    data Selector        = Selector
                           { Selector -> Annotation
    selector_annotation :: Annotation
                           , Selector -> TargetNamespace
    selector_xpath      :: String
                           }
                         deriving (Selector -> Selector -> Bool
    (Selector -> Selector -> Bool)
    -> (Selector -> Selector -> Bool) -> Eq Selector
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Selector -> Selector -> Bool
    == :: Selector -> Selector -> Bool
    $c/= :: Selector -> Selector -> Bool
    /= :: Selector -> Selector -> Bool
    Eq,Int -> Selector -> ShowS
    [Selector] -> ShowS
    Selector -> TargetNamespace
    (Int -> Selector -> ShowS)
    -> (Selector -> TargetNamespace)
    -> ([Selector] -> ShowS)
    -> Show Selector
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Selector -> ShowS
    showsPrec :: Int -> Selector -> ShowS
    $cshow :: Selector -> TargetNamespace
    show :: Selector -> TargetNamespace
    $cshowList :: [Selector] -> ShowS
    showList :: [Selector] -> ShowS
    Show)
    data Field           = Field
                           { Field -> Annotation
    field_annotation :: Annotation
                           , Field -> TargetNamespace
    field_xpath      :: String
                           }
                         deriving (Field -> Field -> Bool
    (Field -> Field -> Bool) -> (Field -> Field -> Bool) -> Eq Field
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Field -> Field -> Bool
    == :: Field -> Field -> Bool
    $c/= :: Field -> Field -> Bool
    /= :: Field -> Field -> Bool
    Eq,Int -> Field -> ShowS
    [Field] -> ShowS
    Field -> TargetNamespace
    (Int -> Field -> ShowS)
    -> (Field -> TargetNamespace) -> ([Field] -> ShowS) -> Show Field
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Field -> ShowS
    showsPrec :: Int -> Field -> ShowS
    $cshow :: Field -> TargetNamespace
    show :: Field -> TargetNamespace
    $cshowList :: [Field] -> ShowS
    showList :: [Field] -> ShowS
    Show)

    data Occurs        = Occurs (Maybe Int) (Maybe Int)
                         deriving (Occurs -> Occurs -> Bool
    (Occurs -> Occurs -> Bool)
    -> (Occurs -> Occurs -> Bool) -> Eq Occurs
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Occurs -> Occurs -> Bool
    == :: Occurs -> Occurs -> Bool
    $c/= :: Occurs -> Occurs -> Bool
    /= :: Occurs -> Occurs -> Bool
    Eq,Int -> Occurs -> ShowS
    [Occurs] -> ShowS
    Occurs -> TargetNamespace
    (Int -> Occurs -> ShowS)
    -> (Occurs -> TargetNamespace)
    -> ([Occurs] -> ShowS)
    -> Show Occurs
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Occurs -> ShowS
    showsPrec :: Int -> Occurs -> ShowS
    $cshow :: Occurs -> TargetNamespace
    show :: Occurs -> TargetNamespace
    $cshowList :: [Occurs] -> ShowS
    showList :: [Occurs] -> ShowS
    Show)
    data Use           = Required | Optional | Prohibited
                         -- (1,1) |   (0,1)  |   (0,0) -- corresp. to Occurs values
                         deriving (Use -> Use -> Bool
    (Use -> Use -> Bool) -> (Use -> Use -> Bool) -> Eq Use
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Use -> Use -> Bool
    == :: Use -> Use -> Bool
    $c/= :: Use -> Use -> Bool
    /= :: Use -> Use -> Bool
    Eq,Int -> Use -> ShowS
    [Use] -> ShowS
    Use -> TargetNamespace
    (Int -> Use -> ShowS)
    -> (Use -> TargetNamespace) -> ([Use] -> ShowS) -> Show Use
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Use -> ShowS
    showsPrec :: Int -> Use -> ShowS
    $cshow :: Use -> TargetNamespace
    show :: Use -> TargetNamespace
    $cshowList :: [Use] -> ShowS
    showList :: [Use] -> ShowS
    Show)

    data PrimitiveType = String | Boolean | Decimal | Float | Double
                       | Duration | DateTime | Time | Date
                       | GYearMonth | GYear | GMonthDay | GDay | GMonth
                       | Base64Binary | HexBinary
                       | AnyURI | QName | Notation
                         deriving (PrimitiveType -> PrimitiveType -> Bool
    (PrimitiveType -> PrimitiveType -> Bool)
    -> (PrimitiveType -> PrimitiveType -> Bool) -> Eq PrimitiveType
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: PrimitiveType -> PrimitiveType -> Bool
    == :: PrimitiveType -> PrimitiveType -> Bool
    $c/= :: PrimitiveType -> PrimitiveType -> Bool
    /= :: PrimitiveType -> PrimitiveType -> Bool
    Eq,Int -> PrimitiveType -> ShowS
    [PrimitiveType] -> ShowS
    PrimitiveType -> TargetNamespace
    (Int -> PrimitiveType -> ShowS)
    -> (PrimitiveType -> TargetNamespace)
    -> ([PrimitiveType] -> ShowS)
    -> Show PrimitiveType
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> PrimitiveType -> ShowS
    showsPrec :: Int -> PrimitiveType -> ShowS
    $cshow :: PrimitiveType -> TargetNamespace
    show :: PrimitiveType -> TargetNamespace
    $cshowList :: [PrimitiveType] -> ShowS
    showList :: [PrimitiveType] -> ShowS
    Show)

    data MyRestriction = Range Occurs
                       | Pattern Regexp
                       | Enumeration [String]
                         deriving (MyRestriction -> MyRestriction -> Bool
    (MyRestriction -> MyRestriction -> Bool)
    -> (MyRestriction -> MyRestriction -> Bool) -> Eq MyRestriction
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: MyRestriction -> MyRestriction -> Bool
    == :: MyRestriction -> MyRestriction -> Bool
    $c/= :: MyRestriction -> MyRestriction -> Bool
    /= :: MyRestriction -> MyRestriction -> Bool
    Eq,Int -> MyRestriction -> ShowS
    [MyRestriction] -> ShowS
    MyRestriction -> TargetNamespace
    (Int -> MyRestriction -> ShowS)
    -> (MyRestriction -> TargetNamespace)
    -> ([MyRestriction] -> ShowS)
    -> Show MyRestriction
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> MyRestriction -> ShowS
    showsPrec :: Int -> MyRestriction -> ShowS
    $cshow :: MyRestriction -> TargetNamespace
    show :: MyRestriction -> TargetNamespace
    $cshowList :: [MyRestriction] -> ShowS
    showList :: [MyRestriction] -> ShowS
    Show)
    type Mixed         = Bool
    type Nillable      = Bool
    type Fixed         = Bool

    data Annotation    = Documentation String
                       | AppInfo String
                       | NoAnnotation String
                         deriving (Annotation -> Annotation -> Bool
    (Annotation -> Annotation -> Bool)
    -> (Annotation -> Annotation -> Bool) -> Eq Annotation
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Annotation -> Annotation -> Bool
    == :: Annotation -> Annotation -> Bool
    $c/= :: Annotation -> Annotation -> Bool
    /= :: Annotation -> Annotation -> Bool
    Eq,Int -> Annotation -> ShowS
    [Annotation] -> ShowS
    Annotation -> TargetNamespace
    (Int -> Annotation -> ShowS)
    -> (Annotation -> TargetNamespace)
    -> ([Annotation] -> ShowS)
    -> Show Annotation
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Annotation -> ShowS
    showsPrec :: Int -> Annotation -> ShowS
    $cshow :: Annotation -> TargetNamespace
    show :: Annotation -> TargetNamespace
    $cshowList :: [Annotation] -> ShowS
    showList :: [Annotation] -> ShowS
    Show)

    data QForm         = Qualified | Unqualified -- only matters for locally decl'd
                         deriving (QForm -> QForm -> Bool
    (QForm -> QForm -> Bool) -> (QForm -> QForm -> Bool) -> Eq QForm
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: QForm -> QForm -> Bool
    == :: QForm -> QForm -> Bool
    $c/= :: QForm -> QForm -> Bool
    /= :: QForm -> QForm -> Bool
    Eq,Int -> QForm -> ShowS
    [QForm] -> ShowS
    QForm -> TargetNamespace
    (Int -> QForm -> ShowS)
    -> (QForm -> TargetNamespace) -> ([QForm] -> ShowS) -> Show QForm
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> QForm -> ShowS
    showsPrec :: Int -> QForm -> ShowS
    $cshow :: QForm -> TargetNamespace
    show :: QForm -> TargetNamespace
    $cshowList :: [QForm] -> ShowS
    showList :: [QForm] -> ShowS
    Show)
    type TargetNamespace
                       = URI
    data Final         = NoExtension | NoRestriction | AllFinal
                         deriving (Final -> Final -> Bool
    (Final -> Final -> Bool) -> (Final -> Final -> Bool) -> Eq Final
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Final -> Final -> Bool
    == :: Final -> Final -> Bool
    $c/= :: Final -> Final -> Bool
    /= :: Final -> Final -> Bool
    Eq,Int -> Final -> ShowS
    [Final] -> ShowS
    Final -> TargetNamespace
    (Int -> Final -> ShowS)
    -> (Final -> TargetNamespace) -> ([Final] -> ShowS) -> Show Final
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Final -> ShowS
    showsPrec :: Int -> Final -> ShowS
    $cshow :: Final -> TargetNamespace
    show :: Final -> TargetNamespace
    $cshowList :: [Final] -> ShowS
    showList :: [Final] -> ShowS
    Show)
    type Block         = Final
    data ProcessContents
                       = Skip | Lax | Strict
                         deriving (ProcessContents -> ProcessContents -> Bool
    (ProcessContents -> ProcessContents -> Bool)
    -> (ProcessContents -> ProcessContents -> Bool)
    -> Eq ProcessContents
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ProcessContents -> ProcessContents -> Bool
    == :: ProcessContents -> ProcessContents -> Bool
    $c/= :: ProcessContents -> ProcessContents -> Bool
    /= :: ProcessContents -> ProcessContents -> Bool
    Eq,Int -> ProcessContents -> ShowS
    [ProcessContents] -> ShowS
    ProcessContents -> TargetNamespace
    (Int -> ProcessContents -> ShowS)
    -> (ProcessContents -> TargetNamespace)
    -> ([ProcessContents] -> ShowS)
    -> Show ProcessContents
    forall a.
    (Int -> a -> ShowS)
    -> (a -> TargetNamespace) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ProcessContents -> ShowS
    showsPrec :: Int -> ProcessContents -> ShowS
    $cshow :: ProcessContents -> TargetNamespace
    show :: ProcessContents -> TargetNamespace
    $cshowList :: [ProcessContents] -> ShowS
    showList :: [ProcessContents] -> ShowS
    Show)

    {-
    data Constraint    = Unique Selector [Field]
                       | Key    Selector [Field]
                       | KeyRef Selector [Field]
                         deriving (Eq,Show)
    type Selector      = String	-- XPath query for scope of constraint
    type Field         = String	-- XPath query for entity being constrained
    -}

    -- check all of the following.
    type SchemaLocation= String
    type DefaultValue  = String
    type FixedValue    = String
    type Regexp        = String
    type URI           = String
    type TypeName      = String

    instance Monoid Annotation where
      mempty :: Annotation
    mempty = TargetNamespace -> Annotation
    NoAnnotation TargetNamespace
    "Monoid.mempty <Annotation>"
      mappend :: Annotation -> Annotation -> Annotation
    mappend = Annotation -> Annotation -> Annotation
    forall a. Semigroup a => a -> a -> a
    (<>)

    instance Semigroup Annotation where
      (Documentation TargetNamespace
    d) <> :: Annotation -> Annotation -> Annotation
    <> (Documentation TargetNamespace
    e) = TargetNamespace -> Annotation
    Documentation (TargetNamespace
    dTargetNamespace -> ShowS
    forall a. [a] -> [a] -> [a]
    ++TargetNamespace
    "\n"TargetNamespace -> ShowS
    forall a. [a] -> [a] -> [a]
    ++TargetNamespace
    e)
      Annotation
    _                 <> (Documentation TargetNamespace
    e) = TargetNamespace -> Annotation
    Documentation TargetNamespace
    e
      Annotation
    ann               <> Annotation
    _                 = Annotation
    ann

    -- | This instance is pretty unsatisfactory, and is useful only for
    -- building environments involving recursive modules.  The /mappend/
    -- method is left-biased, and the /mempty/ value contains lots of
    -- undefined values.
    instance Monoid Schema where
      mempty :: Schema
    mempty        = Schema{ schema_items :: [SchemaItem]
    schema_items=[] }
      mappend :: Schema -> Schema -> Schema
    mappend       = Schema -> Schema -> Schema
    forall a. Semigroup a => a -> a -> a
    (<>)

    instance Semigroup Schema where
      Schema
    s <> :: Schema -> Schema -> Schema
    <> Schema
    t = Schema
    s{ schema_items = schema_items s ++ schema_items t }