HaXml-1.25.3: Utilities for manipulating XML documents

Safe HaskellSafe
LanguageHaskell98

Text.XML.HaXml.Schema.PrimitiveTypes

Contents

Synopsis

Type class for parsing simpleTypes

class SimpleType a where Source

Ultimately, an XML parser will find some plain text as the content of a simpleType, which will need to be parsed. We use a TextParser, because values of simpleTypes can also be given elsewhere, e.g. as attribute values in an XSD definition, e.g. to restrict the permissible values of the simpleType. Such restrictions are therefore implemented as layered parsers.

module Text.Parse

Primitive XSD datatypes

data Float :: *

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

data Double :: *

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

data QName Source

A QName is a (possibly) qualified name, in the sense of XML namespaces.

Constructors

N Name 
QN Namespace Name 

Derived, yet builtin, datatypes

data Integer :: *

Invariant: Jn# and Jp# are used iff value doesn't fit in S#

Useful properties resulting from the invariants:

data Int :: *

A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class.