Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
A type model for Haskell datatypes that bears a reasonable correspondence to the XSD type model.
- type Comment = Maybe String
- data Module = Module {
- module_name :: XName
- module_xsd_ns :: Maybe XName
- module_re_exports :: [Decl]
- module_import_only :: [Decl]
- module_decls :: [Decl]
- data Decl
- = NamedSimpleType XName XName Comment
- | RestrictSimpleType XName XName [Restrict] Comment
- | ExtendSimpleType XName XName [Attribute] Comment
- | UnionSimpleTypes XName [XName] Comment
- | EnumSimpleType XName [(XName, Comment)] Comment
- | ElementsAttrs XName [Element] [Attribute] Comment
- | ElementsAttrsAbstract XName [(XName, Maybe XName)] Comment
- | ElementOfType Element
- | ElementAbstractOfType XName XName [(XName, Maybe XName)] Comment
- | Choice XName [Element] Comment
- | Group XName [Element] Comment
- | RestrictComplexType XName XName Comment
- | ExtendComplexType XName XName [Element] [Attribute] [Element] [Attribute] (Maybe XName) Bool [XName] Comment
- | ExtendComplexTypeAbstract XName XName [(XName, Maybe XName)] (Maybe XName) [XName] Comment
- | XSDInclude XName Comment
- | XSDImport XName (Maybe XName) Comment
- | XSDComment Comment
- data Element
- = Element {
- elem_name :: XName
- elem_type :: XName
- elem_modifier :: Modifier
- elem_byRef :: Bool
- elem_locals :: [Decl]
- elem_substs :: Maybe [XName]
- elem_comment :: Comment
- | OneOf {
- elem_oneOf :: [[Element]]
- elem_modifier :: Modifier
- elem_comment :: Comment
- | AnyElem { }
- | Text
- = Element {
- data Attribute = Attribute {
- attr_name :: XName
- attr_type :: XName
- attr_required :: Bool
- attr_comment :: Comment
- data Modifier
- data Restrict
- mkModule :: String -> Schema -> [Decl] -> Module
Documentation
type Comment = Maybe String Source
Comments can be attached to most things, but not all of them will exist.
The whole Haskell module.
Module | |
|
There are essentially simple types, and complex types, each of which can be either restricted or extended. There are four kinds of complex type: choices, sequences, named groups, or a simple element with content.
Element | |
| |
OneOf | |
| |
AnyElem | |
Text |
Attribute | |
|