| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell98 |
Text.XML.HaXml.Schema.PrimitiveTypes
Synopsis
- class SimpleType a where
- acceptingParser :: TextParser a
- simpleTypeText :: a -> String
- class Functor f => Applicative (f :: Type -> Type) where
- class Applicative f => Alternative (f :: Type -> Type) where
- (<$) :: Functor f => a -> f b -> f a
- (<**>) :: Applicative f => f a -> f (a -> b) -> f b
- liftA :: Applicative f => (a -> b) -> f a -> f b
- liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- satisfy :: (t -> Bool) -> Parser t t
- eof :: Parser t ()
- optional :: Alternative f => f a -> f (Maybe a)
- many1 :: PolyParse p => p a -> p [a]
- sepBy :: PolyParse p => p a -> p sep -> p [a]
- sepBy1 :: PolyParse p => p a -> p sep -> p [a]
- parens :: Bool -> TextParser a -> TextParser a
- apply :: PolyParse p => p (a -> b) -> p a -> p b
- asum :: (Foldable t, Alternative f) => t (f a) -> f a
- newtype Const a (b :: k) = Const {
- getConst :: a
- bracket :: PolyParse p => p bra -> p ket -> p a -> p a
- newtype ZipList a = ZipList {
- getZipList :: [a]
- newtype WrappedArrow (a :: Type -> Type -> Type) b c = WrapArrow {
- unwrapArrow :: a b c
- newtype WrappedMonad (m :: Type -> Type) a = WrapMonad {
- unwrapMonad :: m a
- newtype Parser t a = P ([t] -> Result [t] a)
- data Result z a
- reparse :: [t] -> Parser t ()
- class (Functor p, Monad p, MonadFail p, Applicative p, Alternative p, Commitment p) => PolyParse (p :: Type -> Type)
- class Commitment (p :: Type -> Type) where
- discard :: PolyParse p => p a -> p b -> p a
- failBad :: PolyParse p => String -> p a
- adjustErrBad :: PolyParse p => p a -> (String -> String) -> p a
- oneOf :: PolyParse p => [p a] -> p a
- indent :: Int -> String -> String
- exactly :: PolyParse p => Int -> p a -> p [a]
- upto :: PolyParse p => Int -> p a -> p [a]
- bracketSep :: PolyParse p => p bra -> p sep -> p ket -> p a -> p [a]
- manyFinally :: PolyParse p => p a -> p z -> p [a]
- manyFinally' :: (PolyParse p, Show a) => p a -> p z -> p [a]
- onFail :: Parser t a -> Parser t a -> Parser t a
- next :: Parser t t
- satisfyMsg :: Show t => (t -> Bool) -> String -> Parser t t
- runParser :: Parser t a -> [t] -> (Either String a, [t])
- class Parse a where
- parse :: TextParser a
- parsePrec :: Int -> TextParser a
- parseList :: TextParser [a]
- type TextParser a = Parser Char a
- parseByRead :: Read a => String -> TextParser a
- readByParse :: TextParser a -> ReadS a
- readsPrecByParsePrec :: (Int -> TextParser a) -> Int -> ReadS a
- word :: TextParser String
- isWord :: String -> TextParser String
- literal :: String -> TextParser String
- optionalParens :: TextParser a -> TextParser a
- field :: Parse a => String -> TextParser a
- constructors :: [(String, TextParser a)] -> TextParser a
- enumeration :: Show a => String -> [a] -> TextParser a
- parseSigned :: Real a => TextParser a -> TextParser a
- parseInt :: Integral a => String -> a -> (Char -> Bool) -> (Char -> Int) -> TextParser a
- parseDec :: Integral a => TextParser a
- parseOct :: Integral a => TextParser a
- parseHex :: Integral a => TextParser a
- parseFloat :: RealFrac a => TextParser a
- parseLitChar' :: TextParser Char
- parseLitChar :: TextParser Char
- allAsString :: TextParser String
- newtype XsdString = XsdString String
- type Boolean = Bool
- data Base64Binary = Base64Binary String
- data HexBinary = HexBinary String
- data Float
- data Decimal = Decimal Double
- data Double
- data AnyURI = AnyURI String
- data QName
- data NOTATION = NOTATION String
- data Duration = Duration Bool Int Int Int Int Int Float
- data DateTime = DateTime String
- data Time = Time String
- data Date = Date String
- data GYearMonth = GYearMonth String
- data GYear = GYear String
- data GMonthDay = GMonthDay String
- data GDay = GDay String
- data GMonth = GMonth String
- newtype NormalizedString = Normalized String
- newtype Token = Token String
- newtype Language = Language String
- newtype Name = Name String
- newtype NCName = NCName String
- newtype ID = ID String
- newtype IDREF = IDREF String
- newtype IDREFS = IDREFS String
- newtype ENTITY = ENTITY String
- newtype ENTITIES = ENTITIES String
- newtype NMTOKEN = NMTOKEN String
- newtype NMTOKENS = NMTOKENS String
- data Integer
- newtype NonPositiveInteger = NonPos Integer
- newtype NegativeInteger = Negative Integer
- newtype Long = Long Int64
- data Int
- newtype Short = Short Int16
- newtype Byte = Byte Int8
- newtype NonNegativeInteger = NonNeg Integer
- newtype UnsignedLong = ULong Word64
- newtype UnsignedInt = UInt Word32
- newtype UnsignedShort = UShort Word16
- newtype UnsignedByte = UByte Word8
- newtype PositiveInteger = Positive Integer
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.
Instances
class Functor f => Applicative (f :: Type -> Type) where Source #
A functor with application, providing operations to
A minimal complete definition must include implementations of pure
and of either <*> or liftA2. If it defines both, then they must behave
the same as their default definitions:
(<*>) =liftA2id
liftA2f x y = f<$>x<*>y
Further, any definition must satisfy the following:
- Identity
pureid<*>v = v- Composition
pure(.)<*>u<*>v<*>w = u<*>(v<*>w)- Homomorphism
puref<*>purex =pure(f x)- Interchange
u
<*>purey =pure($y)<*>u
The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:
As a consequence of these laws, the Functor instance for f will satisfy
It may be useful to note that supposing
forall x y. p (q x y) = f x . g y
it follows from the above that
liftA2p (liftA2q u v) =liftA2f u .liftA2g v
If f is also a Monad, it should satisfy
(which implies that pure and <*> satisfy the applicative functor laws).
Methods
Lift a value into the Structure.
Examples
>>>pure 1 :: Maybe IntJust 1
>>>pure 'z' :: [Char]"z"
>>>pure (pure ":D") :: Maybe [String]Just [":D"]
(<*>) :: f (a -> b) -> f a -> f b infixl 4 Source #
Sequential application.
A few functors support an implementation of <*> that is more
efficient than the default one.
Example
Used in combination with , (<$>) can be used to build a record.(<*>)
>>>data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}
>>>produceFoo :: Applicative f => f Foo>>>produceBar :: Applicative f => f Bar>>>produceBaz :: Applicative f => f Baz
>>>mkState :: Applicative f => f MyState>>>mkState = MyState <$> produceFoo <*> produceBar <*> produceBaz
liftA2 :: (a -> b -> c) -> f a -> f b -> f c Source #
Lift a binary function to actions.
Some functors support an implementation of liftA2 that is more
efficient than the default one. In particular, if fmap is an
expensive operation, it is likely better to use liftA2 than to
fmap over the structure and then use <*>.
This became a typeclass method in 4.10.0.0. Prior to that, it was
a function defined in terms of <*> and fmap.
Example
>>>liftA2 (,) (Just 3) (Just 5)Just (3,5)
>>>liftA2 (+) [1, 2, 3] [4, 5, 6][5,6,7,6,7,8,7,8,9]
(*>) :: f a -> f b -> f b infixl 4 Source #
Sequence actions, discarding the value of the first argument.
Examples
If used in conjunction with the Applicative instance for Maybe,
you can chain Maybe computations, with a possible "early return"
in case of Nothing.
>>>Just 2 *> Just 3Just 3
>>>Nothing *> Just 3Nothing
Of course a more interesting use case would be to have effectful computations instead of just returning pure values.
>>>import Data.Char>>>import GHC.Internal.Text.ParserCombinators.ReadP>>>let p = string "my name is " *> munch1 isAlpha <* eof>>>readP_to_S p "my name is Simon"[("Simon","")]
(<*) :: f a -> f b -> f a infixl 4 Source #
Sequence actions, discarding the value of the second argument.
Instances
| Applicative Complex | Since: base-4.9.0.0 |
| Applicative First | Since: base-4.9.0.0 |
| Applicative Last | Since: base-4.9.0.0 |
| Applicative Max | Since: base-4.9.0.0 |
| Applicative Min | Since: base-4.9.0.0 |
| Applicative Put | |
| Applicative Seq | Since: containers-0.5.4 |
| Applicative Tree | |
| Applicative NonEmpty | Since: base-4.9.0.0 |
Defined in GHC.Internal.Base | |
| Applicative ZipList | f <$> ZipList xs1 <*> ... <*> ZipList xsN
= ZipList (zipWithN f xs1 ... xsN)where (\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
= ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
= ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Since: base-2.1 |
Defined in GHC.Internal.Functor.ZipList | |
| Applicative Par1 | Since: base-4.9.0.0 |
| Applicative P | Since: base-4.5.0.0 |
| Applicative ReadP | Since: base-4.6.0.0 |
Defined in GHC.Internal.Text.ParserCombinators.ReadP | |
| Applicative IO | Since: base-2.1 |
| Applicative Parser | |
Defined in Text.ParserCombinators.HuttonMeijer | |
| Applicative Parser | |
Defined in Text.ParserCombinators.Poly.ByteString | |
| Applicative Parser | |
Defined in Text.ParserCombinators.Poly.ByteStringChar | |
| Applicative Parser | |
Defined in Text.ParserCombinators.Poly.Text | |
| Applicative Maybe | Since: base-2.1 |
| Applicative Solo | Since: base-4.15 |
| Applicative [] | Since: base-2.1 |
| Monad m => Applicative (WrappedMonad m) | Since: base-2.1 |
Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a Source # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c Source # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a Source # | |
| Applicative (SetM s) | |
| Applicative (Either e) | Since: base-3.0 |
Defined in GHC.Internal.Data.Either | |
| Applicative (U1 :: Type -> Type) | Since: base-4.9.0.0 |
| Applicative (Parser t) | |
Defined in Text.ParserCombinators.Poly.Lazy | |
| Applicative (Parser t) | |
Defined in Text.ParserCombinators.Poly.Lex | |
| Applicative (Parser t) | |
Defined in Text.ParserCombinators.Poly.Parser | |
| Applicative (Parser s) | |
Defined in Text.ParserCombinators.Poly.StateText | |
| Monoid a => Applicative ((,) a) | For tuples, the ("hello ", (+15)) <*> ("world!", 2002)
("hello world!",2017)Since: base-2.1 |
| Arrow a => Applicative (WrappedArrow a b) | Since: base-2.1 |
Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 Source # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 Source # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c Source # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 Source # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 Source # | |
| (Applicative f, Monad f) => Applicative (WhenMissing f x) | Equivalent to Since: containers-0.5.9 |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMissing f x a Source # (<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b Source # liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c Source # (*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b Source # (<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a Source # | |
| Monoid m => Applicative (Const m :: Type -> Type) | Since: base-2.0.1 |
Defined in GHC.Internal.Data.Functor.Const | |
| (Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f) | Since: base-4.17.0.0 |
Defined in GHC.Internal.Generics Methods pure :: a -> Generically1 f a Source # (<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b Source # liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c Source # (*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b Source # (<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a Source # | |
| Applicative f => Applicative (Rec1 f) | Since: base-4.9.0.0 |
| Applicative (Parser s t) | |
Defined in Text.ParserCombinators.Poly.StateLazy Methods pure :: a -> Parser s t a Source # (<*>) :: Parser s t (a -> b) -> Parser s t a -> Parser s t b Source # liftA2 :: (a -> b -> c) -> Parser s t a -> Parser s t b -> Parser s t c Source # (*>) :: Parser s t a -> Parser s t b -> Parser s t b Source # (<*) :: Parser s t a -> Parser s t b -> Parser s t a Source # | |
| Applicative (Parser s t) | |
Defined in Text.ParserCombinators.Poly.StateParser Methods pure :: a -> Parser s t a Source # (<*>) :: Parser s t (a -> b) -> Parser s t a -> Parser s t b Source # liftA2 :: (a -> b -> c) -> Parser s t a -> Parser s t b -> Parser s t c Source # (*>) :: Parser s t a -> Parser s t b -> Parser s t b Source # (<*) :: Parser s t a -> Parser s t b -> Parser s t a Source # | |
| (Monoid a, Monoid b) => Applicative ((,,) a b) | Since: base-4.14.0.0 |
Defined in GHC.Internal.Base | |
| (Applicative f, Applicative g) => Applicative (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product Methods pure :: a -> Product f g a Source # (<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b Source # liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c Source # (*>) :: Product f g a -> Product f g b -> Product f g b Source # (<*) :: Product f g a -> Product f g b -> Product f g a Source # | |
| (Monad f, Applicative f) => Applicative (WhenMatched f x y) | Equivalent to Since: containers-0.5.9 |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMatched f x y a Source # (<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b Source # liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c Source # (*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b Source # (<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a Source # | |
| (Applicative f, Monad f) => Applicative (WhenMissing f k x) | Equivalent to Since: containers-0.5.9 |
Defined in Data.Map.Internal Methods pure :: a -> WhenMissing f k x a Source # (<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b Source # liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c Source # (*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b Source # (<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a Source # | |
| (Applicative f, Applicative g) => Applicative (f :*: g) | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics | |
| Monoid c => Applicative (K1 i c :: Type -> Type) | Since: base-4.12.0.0 |
| Applicative (Parser s t e) | |
Defined in Text.ParserCombinators.HuttonMeijerWallace Methods pure :: a -> Parser s t e a Source # (<*>) :: Parser s t e (a -> b) -> Parser s t e a -> Parser s t e b Source # liftA2 :: (a -> b -> c) -> Parser s t e a -> Parser s t e b -> Parser s t e c Source # (*>) :: Parser s t e a -> Parser s t e b -> Parser s t e b Source # (<*) :: Parser s t e a -> Parser s t e b -> Parser s t e a Source # | |
| (Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) | Since: base-4.14.0.0 |
Defined in GHC.Internal.Base Methods pure :: a0 -> (a, b, c, a0) Source # (<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) Source # liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) Source # (*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) Source # (<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) Source # | |
| Applicative ((->) r) | Since: base-2.1 |
| (Applicative f, Applicative g) => Applicative (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose Methods pure :: a -> Compose f g a Source # (<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b Source # liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c Source # (*>) :: Compose f g a -> Compose f g b -> Compose f g b Source # (<*) :: Compose f g a -> Compose f g b -> Compose f g a Source # | |
| (Monad f, Applicative f) => Applicative (WhenMatched f k x y) | Equivalent to Since: containers-0.5.9 |
Defined in Data.Map.Internal Methods pure :: a -> WhenMatched f k x y a Source # (<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b Source # liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c Source # (*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b Source # (<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a Source # | |
| (Applicative f, Applicative g) => Applicative (f :.: g) | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics | |
| Applicative f => Applicative (M1 i c f) | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics | |
class Applicative f => Alternative (f :: Type -> Type) where Source #
A monoid on applicative functors.
If defined, some and many should be the least solutions
of the equations:
Examples
>>>Nothing <|> Just 42Just 42
>>>[1, 2] <|> [3, 4][1,2,3,4]
>>>empty <|> print (2^15)32768
Methods
The identity of <|>
empty <|> a == a a <|> empty == a
(<|>) :: f a -> f a -> f a infixl 3 Source #
An associative binary operation
One or more.
Examples
>>>some (putStr "la")lalalalalalalalala... * goes on forever *
>>>some Nothingnothing
>>>take 5 <$> some (Just 1)* hangs forever *
Note that this function can be used with Parsers based on
Applicatives. In that case some parser will attempt to
parse parser one or more times until it fails.
Zero or more.
Examples
>>>many (putStr "la")lalalalalalalalala... * goes on forever *
>>>many NothingJust []
>>>take 5 <$> many (Just 1)* hangs forever *
Note that this function can be used with Parsers based on
Applicatives. In that case many parser will attempt to
parse parser zero or more times until it fails.
Instances
| Alternative Seq | Since: containers-0.5.4 |
| Alternative ZipList | Since: base-4.11.0.0 |
| Alternative P | Since: base-4.5.0.0 |
| Alternative ReadP | Since: base-4.6.0.0 |
| Alternative IO | Takes the first non-throwing Since: base-4.9.0.0 |
| Alternative Parser | |
| Alternative Parser | |
| Alternative Parser | |
| Alternative Parser | |
| Alternative Maybe | Picks the leftmost Since: base-2.1 |
| Alternative [] | Combines lists by concatenation, starting from the empty list. Since: base-2.1 |
| MonadPlus m => Alternative (WrappedMonad m) | Since: base-2.1 |
Defined in Control.Applicative Methods empty :: WrappedMonad m a Source # (<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a Source # some :: WrappedMonad m a -> WrappedMonad m [a] Source # many :: WrappedMonad m a -> WrappedMonad m [a] Source # | |
| Alternative (U1 :: Type -> Type) | Since: base-4.9.0.0 |
| Alternative (Parser t) | |
| Alternative (Parser t) | |
| Alternative (Parser t) | |
| Alternative (Parser s) | |
| (ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) | Since: base-2.1 |
Defined in Control.Applicative Methods empty :: WrappedArrow a b a0 Source # (<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 Source # some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] Source # many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] Source # | |
| (Generic1 f, Alternative (Rep1 f)) => Alternative (Generically1 f) | Since: base-4.17.0.0 |
Defined in GHC.Internal.Generics Methods empty :: Generically1 f a Source # (<|>) :: Generically1 f a -> Generically1 f a -> Generically1 f a Source # some :: Generically1 f a -> Generically1 f [a] Source # many :: Generically1 f a -> Generically1 f [a] Source # | |
| Alternative f => Alternative (Rec1 f) | Since: base-4.9.0.0 |
| Alternative (Parser s t) | |
| Alternative (Parser s t) | |
| (Alternative f, Alternative g) => Alternative (Product f g) | Since: base-4.9.0.0 |
| (Alternative f, Alternative g) => Alternative (f :*: g) | Since: base-4.9.0.0 |
| Alternative (Parser s t e) | |
| (Alternative f, Applicative g) => Alternative (Compose f g) | Since: base-4.9.0.0 |
| (Alternative f, Applicative g) => Alternative (f :.: g) | Since: base-4.9.0.0 |
| Alternative f => Alternative (M1 i c f) | Since: base-4.9.0.0 |
(<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 Source #
A variant of <*> with the types of the arguments reversed. It differs from
in that the effects are resolved in the order the arguments are
presented.flip (<*>)
Examples
>>>(<**>) (print 1) (id <$ print 2)1 2
>>>flip (<*>) (print 1) (id <$ print 2)2 1
>>>ZipList [4, 5, 6] <**> ZipList [(+1), (*2), (/3)]ZipList {getZipList = [5.0,10.0,2.0]}
liftA :: Applicative f => (a -> b) -> f a -> f b Source #
Lift a function to actions.
Equivalent to Functor's fmap but implemented using only Applicative's methods:
liftA f a = pure f <*> a
As such this function may be used to implement a Functor instance from an Applicative one.
Examples
Using the Applicative instance for Lists:
>>>liftA (+1) [1, 2][2,3]
Or the Applicative instance for Maybe
>>>liftA (+1) (Just 3)Just 4
liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #
Lift a ternary function to actions.
(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 Source #
An infix synonym for fmap.
The name of this operator is an allusion to $.
Note the similarities between their types:
($) :: (a -> b) -> a -> b (<$>) :: Functor f => (a -> b) -> f a -> f b
Whereas $ is function application, <$> is function
application lifted over a Functor.
Examples
Convert from a to a Maybe Int using Maybe
Stringshow:
>>>show <$> NothingNothing
>>>show <$> Just 3Just "3"
Convert from an to an
Either Int IntEither IntString using show:
>>>show <$> Left 17Left 17
>>>show <$> Right 17Right "17"
Double each element of a list:
>>>(*2) <$> [1,2,3][2,4,6]
Apply even to the second element of a pair:
>>>even <$> (2,2)(2,True)
optional :: Alternative f => f a -> f (Maybe a) Source #
One or none.
It is useful for modelling any computation that is allowed to fail.
Examples
Using the Alternative instance of Control.Monad.Except, the following functions:
>>>import Control.Monad.Except
>>>canFail = throwError "it failed" :: Except String Int>>>final = return 42 :: Except String Int
Can be combined by allowing the first function to fail:
>>>runExcept $ canFail *> finalLeft "it failed"
>>>runExcept $ optional canFail *> finalRight 42
parens :: Bool -> TextParser a -> TextParser a #
asum :: (Foldable t, Alternative f) => t (f a) -> f a Source #
The sum of a collection of actions using (<|>), generalizing concat.
asum is just like msum, but generalised to Alternative.
Examples
Basic usage:
>>>asum [Just "Hello", Nothing, Just "World"]Just "Hello"
newtype Const a (b :: k) Source #
The Const functor.
Examples
>>>fmap (++ "World") (Const "Hello")Const "Hello"
Because we ignore the second type parameter to Const,
the Applicative instance, which has
essentially turns into (<*>) :: Monoid m => Const m (a -> b) -> Const m a -> Const m bMonoid m => m -> m -> m, which is (<>)
>>>Const [1, 2, 3] <*> Const [4, 5, 6]Const [1,2,3,4,5,6]
Instances
Lists, but with an Applicative functor based on zipping.
Examples
In contrast to the Applicative for List:
>>>(+) <$> [1, 2, 3] <*> [4, 5, 6][5,6,7,6,7,8,7,8,9]
The Applicative instance of ZipList applies the operation
by pairing up the elements, analogous to zipWithN
>>>(+) <$> ZipList [1, 2, 3] <*> ZipList [4, 5, 6]ZipList {getZipList = [5,7,9]}
>>>(,,,) <$> ZipList [1, 2] <*> ZipList [3, 4] <*> ZipList [5, 6] <*> ZipList [7, 8]ZipList {getZipList = [(1,3,5,7),(2,4,6,8)]}
>>>ZipList [(+1), (^2), (/ 2)] <*> ZipList [5, 5, 5]ZipList {getZipList = [6.0,25.0,2.5]}
Constructors
| ZipList | |
Fields
| |
Instances
| Alternative ZipList | Since: base-4.11.0.0 | ||||
| Applicative ZipList | f <$> ZipList xs1 <*> ... <*> ZipList xsN
= ZipList (zipWithN f xs1 ... xsN)where (\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
= ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
= ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Since: base-2.1 | ||||
Defined in GHC.Internal.Functor.ZipList | |||||
| Functor ZipList | Since: base-2.1 | ||||
| Foldable ZipList | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Functor.ZipList Methods fold :: Monoid m => ZipList m -> m Source # foldMap :: Monoid m => (a -> m) -> ZipList a -> m Source # foldMap' :: Monoid m => (a -> m) -> ZipList a -> m Source # foldr :: (a -> b -> b) -> b -> ZipList a -> b Source # foldr' :: (a -> b -> b) -> b -> ZipList a -> b Source # foldl :: (b -> a -> b) -> b -> ZipList a -> b Source # foldl' :: (b -> a -> b) -> b -> ZipList a -> b Source # foldr1 :: (a -> a -> a) -> ZipList a -> a Source # foldl1 :: (a -> a -> a) -> ZipList a -> a Source # toList :: ZipList a -> [a] Source # null :: ZipList a -> Bool Source # length :: ZipList a -> Int Source # elem :: Eq a => a -> ZipList a -> Bool Source # maximum :: Ord a => ZipList a -> a Source # minimum :: Ord a => ZipList a -> a Source # | |||||
| Traversable ZipList | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Functor.ZipList | |||||
| Generic1 ZipList | |||||
Defined in GHC.Internal.Functor.ZipList Associated Types
| |||||
| Data a => Data (ZipList a) | Since: base-4.14.0.0 | ||||
Defined in GHC.Internal.Functor.ZipList Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZipList a -> c (ZipList a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ZipList a) Source # toConstr :: ZipList a -> Constr Source # dataTypeOf :: ZipList a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ZipList a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ZipList a)) Source # gmapT :: (forall b. Data b => b -> b) -> ZipList a -> ZipList a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ZipList a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ZipList a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) Source # | |||||
| Generic (ZipList a) | |||||
Defined in GHC.Internal.Functor.ZipList Associated Types
| |||||
| IsList (ZipList a) | Since: base-4.15.0.0 | ||||
| Read a => Read (ZipList a) | Since: base-4.7.0.0 | ||||
| Show a => Show (ZipList a) | Since: base-4.7.0.0 | ||||
| Eq a => Eq (ZipList a) | Since: base-4.7.0.0 | ||||
| Ord a => Ord (ZipList a) | Since: base-4.7.0.0 | ||||
Defined in GHC.Internal.Functor.ZipList | |||||
| type Rep1 ZipList | Since: base-4.7.0.0 | ||||
Defined in GHC.Internal.Functor.ZipList | |||||
| type Rep (ZipList a) | Since: base-4.7.0.0 | ||||
Defined in GHC.Internal.Functor.ZipList | |||||
| type Item (ZipList a) | |||||
Defined in GHC.Internal.IsList | |||||
newtype WrappedArrow (a :: Type -> Type -> Type) b c Source #
Constructors
| WrapArrow | |
Fields
| |
Instances
| Generic1 (WrappedArrow a b :: Type -> Type) | |||||
Defined in Control.Applicative Associated Types
Methods from1 :: WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 Source # to1 :: Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 Source # | |||||
| (ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) | Since: base-2.1 | ||||
Defined in Control.Applicative Methods empty :: WrappedArrow a b a0 Source # (<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 Source # some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] Source # many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] Source # | |||||
| Arrow a => Applicative (WrappedArrow a b) | Since: base-2.1 | ||||
Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 Source # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 Source # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c Source # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 Source # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 Source # | |||||
| Arrow a => Functor (WrappedArrow a b) | Since: base-2.1 | ||||
Defined in Control.Applicative Methods fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 Source # (<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 Source # | |||||
| (Typeable a, Typeable b, Typeable c, Data (a b c)) => Data (WrappedArrow a b c) | Since: base-4.14.0.0 | ||||
Defined in Control.Applicative Methods gfoldl :: (forall d b0. Data d => c0 (d -> b0) -> d -> c0 b0) -> (forall g. g -> c0 g) -> WrappedArrow a b c -> c0 (WrappedArrow a b c) Source # gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (WrappedArrow a b c) Source # toConstr :: WrappedArrow a b c -> Constr Source # dataTypeOf :: WrappedArrow a b c -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (WrappedArrow a b c)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (WrappedArrow a b c)) Source # gmapT :: (forall b0. Data b0 => b0 -> b0) -> WrappedArrow a b c -> WrappedArrow a b c Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r Source # gmapQ :: (forall d. Data d => d -> u) -> WrappedArrow a b c -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedArrow a b c -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) Source # | |||||
| Generic (WrappedArrow a b c) | |||||
Defined in Control.Applicative Associated Types
Methods from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x Source # to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c Source # | |||||
| type Rep1 (WrappedArrow a b :: Type -> Type) | Since: base-4.7.0.0 | ||||
Defined in Control.Applicative type Rep1 (WrappedArrow a b :: Type -> Type) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b)))) | |||||
| type Rep (WrappedArrow a b c) | Since: base-4.7.0.0 | ||||
Defined in Control.Applicative type Rep (WrappedArrow a b c) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a b c)))) | |||||
newtype WrappedMonad (m :: Type -> Type) a Source #
Constructors
| WrapMonad | |
Fields
| |
Instances
| Generic1 (WrappedMonad m :: Type -> Type) | |||||
Defined in Control.Applicative Associated Types
Methods from1 :: WrappedMonad m a -> Rep1 (WrappedMonad m) a Source # to1 :: Rep1 (WrappedMonad m) a -> WrappedMonad m a Source # | |||||
| MonadPlus m => Alternative (WrappedMonad m) | Since: base-2.1 | ||||
Defined in Control.Applicative Methods empty :: WrappedMonad m a Source # (<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a Source # some :: WrappedMonad m a -> WrappedMonad m [a] Source # many :: WrappedMonad m a -> WrappedMonad m [a] Source # | |||||
| Monad m => Applicative (WrappedMonad m) | Since: base-2.1 | ||||
Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a Source # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c Source # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a Source # | |||||
| Monad m => Functor (WrappedMonad m) | Since: base-2.1 | ||||
Defined in Control.Applicative Methods fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source # (<$) :: a -> WrappedMonad m b -> WrappedMonad m a Source # | |||||
| Monad m => Monad (WrappedMonad m) | Since: base-4.7.0.0 | ||||
Defined in Control.Applicative Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b Source # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source # return :: a -> WrappedMonad m a Source # | |||||
| (Typeable m, Typeable a, Data (m a)) => Data (WrappedMonad m a) | Since: base-4.14.0.0 | ||||
Defined in Control.Applicative Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonad m a -> c (WrappedMonad m a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonad m a) Source # toConstr :: WrappedMonad m a -> Constr Source # dataTypeOf :: WrappedMonad m a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonad m a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonad m a)) Source # gmapT :: (forall b. Data b => b -> b) -> WrappedMonad m a -> WrappedMonad m a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> WrappedMonad m a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonad m a -> u Source # gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) Source # gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) Source # gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) Source # | |||||
| Generic (WrappedMonad m a) | |||||
Defined in Control.Applicative Associated Types
Methods from :: WrappedMonad m a -> Rep (WrappedMonad m a) x Source # to :: Rep (WrappedMonad m a) x -> WrappedMonad m a Source # | |||||
| type Rep1 (WrappedMonad m :: Type -> Type) | Since: base-4.7.0.0 | ||||
Defined in Control.Applicative type Rep1 (WrappedMonad m :: Type -> Type) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m))) | |||||
| type Rep (WrappedMonad m a) | Since: base-4.7.0.0 | ||||
Defined in Control.Applicative type Rep (WrappedMonad m a) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m a)))) | |||||
Instances
| Alternative (Parser t) | |
| Applicative (Parser t) | |
Defined in Text.ParserCombinators.Poly.Parser | |
| Functor (Parser t) | |
| Monad (Parser t) | |
| MonadFail (Parser t) | |
| Commitment (Parser t) | |
| PolyParse (Parser t) | |
Defined in Text.ParserCombinators.Poly.Parser | |
class (Functor p, Monad p, MonadFail p, Applicative p, Alternative p, Commitment p) => PolyParse (p :: Type -> Type) #
Instances
| PolyParse Parser | |
Defined in Text.ParserCombinators.Poly.ByteString | |
| PolyParse Parser | |
Defined in Text.ParserCombinators.Poly.ByteStringChar | |
| PolyParse Parser | |
Defined in Text.ParserCombinators.Poly.Text | |
| PolyParse (Parser t) | |
Defined in Text.ParserCombinators.Poly.Lazy | |
| PolyParse (Parser t) | |
Defined in Text.ParserCombinators.Poly.Lex | |
| PolyParse (Parser t) | |
Defined in Text.ParserCombinators.Poly.Parser | |
| PolyParse (Parser s) | |
Defined in Text.ParserCombinators.Poly.StateText | |
| PolyParse (Parser s t) | |
Defined in Text.ParserCombinators.Poly.StateLazy | |
| PolyParse (Parser s t) | |
Defined in Text.ParserCombinators.Poly.StateParser | |
class Commitment (p :: Type -> Type) where #
Instances
| Commitment Parser | |
| Commitment Parser | |
| Commitment Parser | |
| Commitment (Parser t) | |
| Commitment (Parser t) | |
| Commitment (Parser t) | |
| Commitment (Parser s) | |
| Commitment (Parser s t) | |
| Commitment (Parser s t) | |
adjustErrBad :: PolyParse p => p a -> (String -> String) -> p a #
bracketSep :: PolyParse p => p bra -> p sep -> p ket -> p a -> p [a] #
manyFinally :: PolyParse p => p a -> p z -> p [a] #
manyFinally' :: (PolyParse p, Show a) => p a -> p z -> p [a] #
Minimal complete definition
Nothing
Instances
| Parse Ordering | |
Defined in Text.Parse Methods parse :: TextParser Ordering # parsePrec :: Int -> TextParser Ordering # parseList :: TextParser [Ordering] # | |
| Parse Integer | |
Defined in Text.Parse Methods parse :: TextParser Integer # parsePrec :: Int -> TextParser Integer # parseList :: TextParser [Integer] # | |
| Parse () | |
Defined in Text.Parse | |
| Parse Bool | |
Defined in Text.Parse Methods parse :: TextParser Bool # parsePrec :: Int -> TextParser Bool # parseList :: TextParser [Bool] # | |
| Parse Char | |
Defined in Text.Parse Methods parse :: TextParser Char # parsePrec :: Int -> TextParser Char # parseList :: TextParser [Char] # | |
| Parse Double | |
Defined in Text.Parse Methods parse :: TextParser Double # parsePrec :: Int -> TextParser Double # parseList :: TextParser [Double] # | |
| Parse Float | |
Defined in Text.Parse Methods parse :: TextParser Float # parsePrec :: Int -> TextParser Float # parseList :: TextParser [Float] # | |
| Parse Int | |
Defined in Text.Parse | |
| Parse a => Parse (Maybe a) | |
Defined in Text.Parse Methods parse :: TextParser (Maybe a) # parsePrec :: Int -> TextParser (Maybe a) # parseList :: TextParser [Maybe a] # | |
| Parse a => Parse [a] | |
Defined in Text.Parse | |
| (Parse a, Parse b) => Parse (Either a b) | |
Defined in Text.Parse Methods parse :: TextParser (Either a b) # parsePrec :: Int -> TextParser (Either a b) # parseList :: TextParser [Either a b] # | |
| (Parse a, Parse b) => Parse (a, b) | |
Defined in Text.Parse Methods parse :: TextParser (a, b) # parsePrec :: Int -> TextParser (a, b) # parseList :: TextParser [(a, b)] # | |
| (Parse a, Parse b, Parse c) => Parse (a, b, c) | |
Defined in Text.Parse Methods parse :: TextParser (a, b, c) # parsePrec :: Int -> TextParser (a, b, c) # parseList :: TextParser [(a, b, c)] # | |
type TextParser a = Parser Char a #
parseByRead :: Read a => String -> TextParser a #
readByParse :: TextParser a -> ReadS a #
readsPrecByParsePrec :: (Int -> TextParser a) -> Int -> ReadS a #
word :: TextParser String #
isWord :: String -> TextParser String #
literal :: String -> TextParser String #
optionalParens :: TextParser a -> TextParser a #
field :: Parse a => String -> TextParser a #
constructors :: [(String, TextParser a)] -> TextParser a #
enumeration :: Show a => String -> [a] -> TextParser a #
parseSigned :: Real a => TextParser a -> TextParser a #
parseDec :: Integral a => TextParser a #
parseOct :: Integral a => TextParser a #
parseHex :: Integral a => TextParser a #
parseFloat :: RealFrac a => TextParser a #
Primitive XSD datatypes
Instances
| SimpleType XsdString Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser XsdString Source # simpleTypeText :: XsdString -> String Source # | |
| SchemaType XsdString Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show XsdString Source # | |
| Eq XsdString Source # | |
data Base64Binary Source #
Constructors
| Base64Binary String |
Instances
| SimpleType Base64Binary Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser Base64Binary Source # simpleTypeText :: Base64Binary -> String Source # | |
| SchemaType Base64Binary Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser Base64Binary Source # schemaTypeToXML :: String -> Base64Binary -> [Content ()] Source # | |
| Show Base64Binary Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq Base64Binary Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: Base64Binary -> Base64Binary -> Bool Source # (/=) :: Base64Binary -> Base64Binary -> Bool Source # | |
Instances
| SimpleType HexBinary Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser HexBinary Source # simpleTypeText :: HexBinary -> String Source # | |
| SchemaType HexBinary Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show HexBinary Source # | |
| Eq HexBinary Source # | |
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.
Instances
| SimpleType Float Source # | |||||
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |||||
| SchemaType Float Source # | |||||
Defined in Text.XML.HaXml.Schema.Schema | |||||
| HTypeable Float Source # | |||||
| XmlContent Float Source # | |||||
| PrintfArg Float | Since: base-2.1 | ||||
Defined in Text.Printf | |||||
| Enum Float |
List generators have extremely peculiar behavior, mandated by Haskell Report 2010:
Since: base-2.1 | ||||
Defined in GHC.Internal.Float Methods succ :: Float -> Float Source # pred :: Float -> Float Source # toEnum :: Int -> Float Source # fromEnum :: Float -> Int Source # enumFrom :: Float -> [Float] Source # enumFromThen :: Float -> Float -> [Float] Source # enumFromTo :: Float -> Float -> [Float] Source # enumFromThenTo :: Float -> Float -> Float -> [Float] Source # | |||||
| Floating Float | Since: base-2.1 | ||||
Defined in GHC.Internal.Float Methods exp :: Float -> Float Source # log :: Float -> Float Source # sqrt :: Float -> Float Source # (**) :: Float -> Float -> Float Source # logBase :: Float -> Float -> Float Source # sin :: Float -> Float Source # cos :: Float -> Float Source # tan :: Float -> Float Source # asin :: Float -> Float Source # acos :: Float -> Float Source # atan :: Float -> Float Source # sinh :: Float -> Float Source # cosh :: Float -> Float Source # tanh :: Float -> Float Source # asinh :: Float -> Float Source # acosh :: Float -> Float Source # atanh :: Float -> Float Source # log1p :: Float -> Float Source # expm1 :: Float -> Float Source # | |||||
| RealFloat Float | Since: base-2.1 | ||||
Defined in GHC.Internal.Float Methods floatRadix :: Float -> Integer Source # floatDigits :: Float -> Int Source # floatRange :: Float -> (Int, Int) Source # decodeFloat :: Float -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> Float Source # exponent :: Float -> Int Source # significand :: Float -> Float Source # scaleFloat :: Int -> Float -> Float Source # isNaN :: Float -> Bool Source # isInfinite :: Float -> Bool Source # isDenormalized :: Float -> Bool Source # isNegativeZero :: Float -> Bool Source # | |||||
| Num Float | This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:
Since: base-2.1 | ||||
| Read Float | Since: base-2.1 | ||||
| Fractional Float | This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.
Since: base-2.1 | ||||
| Real Float | Beware that
Since: base-2.1 | ||||
Defined in GHC.Internal.Float Methods toRational :: Float -> Rational Source # | |||||
| RealFrac Float | Beware that results for non-finite arguments are garbage:
and get even more non-sensical if you ask for Since: base-2.1 | ||||
| Show Float | Since: base-2.1 | ||||
| Eq Float | Note that due to the presence of
Also note that
| ||||
| Ord Float | See | ||||
Defined in GHC.Classes | |||||
| Parse Float | |||||
Defined in Text.Parse Methods parse :: TextParser Float # parsePrec :: Int -> TextParser Float # parseList :: TextParser [Float] # | |||||
| Parse Float | |||||
| Pretty Float | |||||
Defined in Text.PrettyPrint.Annotated.HughesPJClass Methods pPrintPrec :: PrettyLevel -> Rational -> Float -> Doc ann Source # pPrint :: Float -> Doc ann Source # pPrintList :: PrettyLevel -> [Float] -> Doc ann Source # | |||||
| Pretty Float | |||||
Defined in Text.PrettyPrint.HughesPJClass Methods pPrintPrec :: PrettyLevel -> Rational -> Float -> Doc Source # pPrint :: Float -> Doc Source # pPrintList :: PrettyLevel -> [Float] -> Doc Source # | |||||
| Random Float | |||||
| UniformRange Float | |||||
Defined in System.Random.Internal | |||||
| Generic1 (URec Float :: k -> Type) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
| Foldable (UFloat :: Type -> Type) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UFloat m -> m Source # foldMap :: Monoid m => (a -> m) -> UFloat a -> m Source # foldMap' :: Monoid m => (a -> m) -> UFloat a -> m Source # foldr :: (a -> b -> b) -> b -> UFloat a -> b Source # foldr' :: (a -> b -> b) -> b -> UFloat a -> b Source # foldl :: (b -> a -> b) -> b -> UFloat a -> b Source # foldl' :: (b -> a -> b) -> b -> UFloat a -> b Source # foldr1 :: (a -> a -> a) -> UFloat a -> a Source # foldl1 :: (a -> a -> a) -> UFloat a -> a Source # toList :: UFloat a -> [a] Source # null :: UFloat a -> Bool Source # length :: UFloat a -> Int Source # elem :: Eq a => a -> UFloat a -> Bool Source # maximum :: Ord a => UFloat a -> a Source # minimum :: Ord a => UFloat a -> a Source # | |||||
| Functor (URec Float :: Type -> Type) | Since: base-4.9.0.0 | ||||
| Generic (URec Float p) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
| Show (URec Float p) | |||||
| Eq (URec Float p) | |||||
| Ord (URec Float p) | |||||
Defined in GHC.Internal.Generics Methods compare :: URec Float p -> URec Float p -> Ordering Source # (<) :: URec Float p -> URec Float p -> Bool Source # (<=) :: URec Float p -> URec Float p -> Bool Source # (>) :: URec Float p -> URec Float p -> Bool Source # (>=) :: URec Float p -> URec Float p -> Bool Source # max :: URec Float p -> URec Float p -> URec Float p Source # min :: URec Float p -> URec Float p -> URec Float p Source # | |||||
| data URec Float (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 | ||||
| type Rep1 (URec Float :: k -> Type) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Generics | |||||
| type Rep (URec Float p) | |||||
Defined in GHC.Internal.Generics | |||||
Instances
| SimpleType Decimal Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Decimal Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Decimal Source # | |
| Eq Decimal Source # | |
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.
Instances
| SimpleType Double Source # | |||||
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |||||
| SchemaType Double Source # | |||||
Defined in Text.XML.HaXml.Schema.Schema | |||||
| HTypeable Double Source # | |||||
| XmlContent Double Source # | |||||
| PrintfArg Double | Since: base-2.1 | ||||
Defined in Text.Printf Methods formatArg :: Double -> FieldFormatter Source # parseFormat :: Double -> ModifierParser Source # | |||||
| Enum Double |
List generators have extremely peculiar behavior, mandated by Haskell Report 2010:
Since: base-2.1 | ||||
Defined in GHC.Internal.Float Methods succ :: Double -> Double Source # pred :: Double -> Double Source # toEnum :: Int -> Double Source # fromEnum :: Double -> Int Source # enumFrom :: Double -> [Double] Source # enumFromThen :: Double -> Double -> [Double] Source # enumFromTo :: Double -> Double -> [Double] Source # enumFromThenTo :: Double -> Double -> Double -> [Double] Source # | |||||
| Floating Double | Since: base-2.1 | ||||
Defined in GHC.Internal.Float Methods exp :: Double -> Double Source # log :: Double -> Double Source # sqrt :: Double -> Double Source # (**) :: Double -> Double -> Double Source # logBase :: Double -> Double -> Double Source # sin :: Double -> Double Source # cos :: Double -> Double Source # tan :: Double -> Double Source # asin :: Double -> Double Source # acos :: Double -> Double Source # atan :: Double -> Double Source # sinh :: Double -> Double Source # cosh :: Double -> Double Source # tanh :: Double -> Double Source # asinh :: Double -> Double Source # acosh :: Double -> Double Source # atanh :: Double -> Double Source # log1p :: Double -> Double Source # expm1 :: Double -> Double Source # | |||||
| RealFloat Double | Since: base-2.1 | ||||
Defined in GHC.Internal.Float Methods floatRadix :: Double -> Integer Source # floatDigits :: Double -> Int Source # floatRange :: Double -> (Int, Int) Source # decodeFloat :: Double -> (Integer, Int) Source # encodeFloat :: Integer -> Int -> Double Source # exponent :: Double -> Int Source # significand :: Double -> Double Source # scaleFloat :: Int -> Double -> Double Source # isNaN :: Double -> Bool Source # isInfinite :: Double -> Bool Source # isDenormalized :: Double -> Bool Source # isNegativeZero :: Double -> Bool Source # | |||||
| Num Double | This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:
Since: base-2.1 | ||||
Defined in GHC.Internal.Float | |||||
| Read Double | Since: base-2.1 | ||||
| Fractional Double | This instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.
Since: base-2.1 | ||||
| Real Double | Beware that
Since: base-2.1 | ||||
Defined in GHC.Internal.Float Methods toRational :: Double -> Rational Source # | |||||
| RealFrac Double | Beware that results for non-finite arguments are garbage:
and get even more non-sensical if you ask for Since: base-2.1 | ||||
| Show Double | Since: base-2.1 | ||||
| Eq Double | Note that due to the presence of
Also note that
| ||||
| Ord Double | IEEE 754 IEEE 754-2008, section 5.11 requires that if at least one of arguments of
IEEE 754-2008, section 5.10 defines Thus, users must be extremely cautious when using Moving further, the behaviour of IEEE 754-2008 compliant | ||||
| Parse Double | |||||
Defined in Text.Parse Methods parse :: TextParser Double # parsePrec :: Int -> TextParser Double # parseList :: TextParser [Double] # | |||||
| Parse Double | |||||
| Pretty Double | |||||
Defined in Text.PrettyPrint.Annotated.HughesPJClass Methods pPrintPrec :: PrettyLevel -> Rational -> Double -> Doc ann Source # pPrint :: Double -> Doc ann Source # pPrintList :: PrettyLevel -> [Double] -> Doc ann Source # | |||||
| Pretty Double | |||||
Defined in Text.PrettyPrint.HughesPJClass Methods pPrintPrec :: PrettyLevel -> Rational -> Double -> Doc Source # pPrint :: Double -> Doc Source # pPrintList :: PrettyLevel -> [Double] -> Doc Source # | |||||
| Random Double | |||||
| UniformRange Double | |||||
Defined in System.Random.Internal | |||||
| Generic1 (URec Double :: k -> Type) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
| Foldable (UDouble :: Type -> Type) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UDouble m -> m Source # foldMap :: Monoid m => (a -> m) -> UDouble a -> m Source # foldMap' :: Monoid m => (a -> m) -> UDouble a -> m Source # foldr :: (a -> b -> b) -> b -> UDouble a -> b Source # foldr' :: (a -> b -> b) -> b -> UDouble a -> b Source # foldl :: (b -> a -> b) -> b -> UDouble a -> b Source # foldl' :: (b -> a -> b) -> b -> UDouble a -> b Source # foldr1 :: (a -> a -> a) -> UDouble a -> a Source # foldl1 :: (a -> a -> a) -> UDouble a -> a Source # toList :: UDouble a -> [a] Source # null :: UDouble a -> Bool Source # length :: UDouble a -> Int Source # elem :: Eq a => a -> UDouble a -> Bool Source # maximum :: Ord a => UDouble a -> a Source # minimum :: Ord a => UDouble a -> a Source # | |||||
| Functor (URec Double :: Type -> Type) | Since: base-4.9.0.0 | ||||
| Generic (URec Double p) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
| Show (URec Double p) | Since: base-4.9.0.0 | ||||
| Eq (URec Double p) | Since: base-4.9.0.0 | ||||
| Ord (URec Double p) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Generics Methods compare :: URec Double p -> URec Double p -> Ordering Source # (<) :: URec Double p -> URec Double p -> Bool Source # (<=) :: URec Double p -> URec Double p -> Bool Source # (>) :: URec Double p -> URec Double p -> Bool Source # (>=) :: URec Double p -> URec Double p -> Bool Source # max :: URec Double p -> URec Double p -> URec Double p Source # min :: URec Double p -> URec Double p -> URec Double p Source # | |||||
| data URec Double (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 | ||||
| type Rep1 (URec Double :: k -> Type) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Generics | |||||
| type Rep (URec Double p) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Generics | |||||
Instances
| SimpleType AnyURI Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType AnyURI Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show AnyURI Source # | |
| Eq AnyURI Source # | |
A QName is a (possibly) qualified name, in the sense of XML namespaces.
Instances
| SimpleType NOTATION Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType NOTATION Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show NOTATION Source # | |
| Eq NOTATION Source # | |
Instances
| SimpleType Duration Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Duration Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Duration Source # | |
| Eq Duration Source # | |
Instances
| SimpleType DateTime Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType DateTime Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show DateTime Source # | |
| Eq DateTime Source # | |
Instances
| SimpleType Time Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Time Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Time Source # | |
| Eq Time Source # | |
Instances
| SimpleType Date Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Date Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Date Source # | |
| Eq Date Source # | |
data GYearMonth Source #
Constructors
| GYearMonth String |
Instances
| SimpleType GYearMonth Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser GYearMonth Source # simpleTypeText :: GYearMonth -> String Source # | |
| SchemaType GYearMonth Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser GYearMonth Source # schemaTypeToXML :: String -> GYearMonth -> [Content ()] Source # | |
| Show GYearMonth Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq GYearMonth Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: GYearMonth -> GYearMonth -> Bool Source # (/=) :: GYearMonth -> GYearMonth -> Bool Source # | |
Instances
| SimpleType GYear Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType GYear Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show GYear Source # | |
| Eq GYear Source # | |
Instances
| SimpleType GMonthDay Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser GMonthDay Source # simpleTypeText :: GMonthDay -> String Source # | |
| SchemaType GMonthDay Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show GMonthDay Source # | |
| Eq GMonthDay Source # | |
Instances
| SimpleType GDay Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType GDay Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show GDay Source # | |
| Eq GDay Source # | |
Instances
| SimpleType GMonth Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType GMonth Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show GMonth Source # | |
| Eq GMonth Source # | |
Derived, yet builtin, datatypes
newtype NormalizedString Source #
Constructors
| Normalized String |
Instances
| SimpleType NormalizedString Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods | |
| SchemaType NormalizedString Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser NormalizedString Source # schemaTypeToXML :: String -> NormalizedString -> [Content ()] Source # | |
| Show NormalizedString Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq NormalizedString Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: NormalizedString -> NormalizedString -> Bool Source # (/=) :: NormalizedString -> NormalizedString -> Bool Source # | |
Instances
| SimpleType Token Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Token Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Token Source # | |
| Eq Token Source # | |
Instances
| SimpleType Language Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Language Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Language Source # | |
| Eq Language Source # | |
Instances
| SimpleType Name Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Name Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Name Source # | |
| Eq Name Source # | |
Instances
| SimpleType NCName Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType NCName Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show NCName Source # | |
| Eq NCName Source # | |
Instances
| SimpleType ID Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType ID Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show ID Source # | |
| Eq ID Source # | |
Instances
| SimpleType IDREF Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType IDREF Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show IDREF Source # | |
| Eq IDREF Source # | |
Instances
| SimpleType IDREFS Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType IDREFS Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show IDREFS Source # | |
| Eq IDREFS Source # | |
Instances
| SimpleType ENTITY Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType ENTITY Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show ENTITY Source # | |
| Eq ENTITY Source # | |
Instances
| SimpleType ENTITIES Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType ENTITIES Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show ENTITIES Source # | |
| Eq ENTITIES Source # | |
Instances
| SimpleType NMTOKEN Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType NMTOKEN Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show NMTOKEN Source # | |
| Eq NMTOKEN Source # | |
Instances
| SimpleType NMTOKENS Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType NMTOKENS Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show NMTOKENS Source # | |
| Eq NMTOKENS Source # | |
Arbitrary precision integers. In contrast with fixed-size integral types
such as Int, the Integer type represents the entire infinite range of
integers.
Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations.
If the value is small (i.e., fits into an Int), the IS constructor is
used. Otherwise IP and IN constructors are used to store a BigNat
representing the positive or the negative value magnitude, respectively.
Invariant: IP and IN are used iff the value does not fit in IS.
Instances
| SimpleType Integer Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Integer Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| HTypeable Integer Source # | |
| XmlContent Integer Source # | |
| PrintfArg Integer | Since: base-2.1 |
Defined in Text.Printf Methods formatArg :: Integer -> FieldFormatter Source # parseFormat :: Integer -> ModifierParser Source # | |
| Enum Integer | Since: base-2.1 |
Defined in GHC.Internal.Enum Methods succ :: Integer -> Integer Source # pred :: Integer -> Integer Source # toEnum :: Int -> Integer Source # fromEnum :: Integer -> Int Source # enumFrom :: Integer -> [Integer] Source # enumFromThen :: Integer -> Integer -> [Integer] Source # enumFromTo :: Integer -> Integer -> [Integer] Source # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] Source # | |
| Num Integer | Since: base-2.1 |
Defined in GHC.Internal.Num | |
| Read Integer | Since: base-2.1 |
| Integral Integer | Since: base-2.0.1 |
Defined in GHC.Internal.Real Methods quot :: Integer -> Integer -> Integer Source # rem :: Integer -> Integer -> Integer Source # div :: Integer -> Integer -> Integer Source # mod :: Integer -> Integer -> Integer Source # quotRem :: Integer -> Integer -> (Integer, Integer) Source # | |
| Real Integer | Since: base-2.0.1 |
Defined in GHC.Internal.Real Methods toRational :: Integer -> Rational Source # | |
| Show Integer | Since: base-2.1 |
| Eq Integer | |
| Ord Integer | |
| Parse Integer | |
Defined in Text.Parse Methods parse :: TextParser Integer # parsePrec :: Int -> TextParser Integer # parseList :: TextParser [Integer] # | |
| Parse Integer | |
| Pretty Integer | |
Defined in Text.PrettyPrint.Annotated.HughesPJClass Methods pPrintPrec :: PrettyLevel -> Rational -> Integer -> Doc ann Source # pPrint :: Integer -> Doc ann Source # pPrintList :: PrettyLevel -> [Integer] -> Doc ann Source # | |
| Pretty Integer | |
Defined in Text.PrettyPrint.HughesPJClass Methods pPrintPrec :: PrettyLevel -> Rational -> Integer -> Doc Source # pPrint :: Integer -> Doc Source # pPrintList :: PrettyLevel -> [Integer] -> Doc Source # | |
| Random Integer | |
| UniformRange Integer | |
Defined in System.Random.Internal | |
newtype NonPositiveInteger Source #
Instances
| SimpleType NonPositiveInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods | |
| SchemaType NonPositiveInteger Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser NonPositiveInteger Source # schemaTypeToXML :: String -> NonPositiveInteger -> [Content ()] Source # | |
| Show NonPositiveInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq NonPositiveInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: NonPositiveInteger -> NonPositiveInteger -> Bool Source # (/=) :: NonPositiveInteger -> NonPositiveInteger -> Bool Source # | |
newtype NegativeInteger Source #
Instances
| SimpleType NegativeInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods | |
| SchemaType NegativeInteger Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser NegativeInteger Source # schemaTypeToXML :: String -> NegativeInteger -> [Content ()] Source # | |
| Show NegativeInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq NegativeInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: NegativeInteger -> NegativeInteger -> Bool Source # (/=) :: NegativeInteger -> NegativeInteger -> Bool Source # | |
Instances
| SimpleType Long Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Long Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Long Source # | |
| Eq Long Source # | |
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.
Instances
| SimpleType Int Source # | |||||
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |||||
| SchemaType Int Source # | |||||
Defined in Text.XML.HaXml.Schema.Schema | |||||
| HTypeable Int Source # | |||||
| XmlContent Int Source # | |||||
| PrintfArg Int | Since: base-2.1 | ||||
Defined in Text.Printf | |||||
| Bounded Int | Since: base-2.1 | ||||
| Enum Int | Since: base-2.1 | ||||
Defined in GHC.Internal.Enum | |||||
| Num Int | Since: base-2.1 | ||||
| Read Int | Since: base-2.1 | ||||
| Integral Int | Since: base-2.0.1 | ||||
| Real Int | Since: base-2.0.1 | ||||
Defined in GHC.Internal.Real Methods toRational :: Int -> Rational Source # | |||||
| Show Int | Since: base-2.1 | ||||
| Eq Int | |||||
| Ord Int | |||||
| Parse Int | |||||
Defined in Text.Parse | |||||
| Parse Int | |||||
| Pretty Int | |||||
Defined in Text.PrettyPrint.Annotated.HughesPJClass Methods pPrintPrec :: PrettyLevel -> Rational -> Int -> Doc ann Source # pPrint :: Int -> Doc ann Source # pPrintList :: PrettyLevel -> [Int] -> Doc ann Source # | |||||
| Pretty Int | |||||
Defined in Text.PrettyPrint.HughesPJClass Methods pPrintPrec :: PrettyLevel -> Rational -> Int -> Doc Source # pPrintList :: PrettyLevel -> [Int] -> Doc Source # | |||||
| Random Int | |||||
| Uniform Int | |||||
Defined in System.Random.Internal | |||||
| UniformRange Int | |||||
Defined in System.Random.Internal | |||||
| Generic1 (URec Int :: k -> Type) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
| Foldable (UInt :: Type -> Type) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UInt m -> m Source # foldMap :: Monoid m => (a -> m) -> UInt a -> m Source # foldMap' :: Monoid m => (a -> m) -> UInt a -> m Source # foldr :: (a -> b -> b) -> b -> UInt a -> b Source # foldr' :: (a -> b -> b) -> b -> UInt a -> b Source # foldl :: (b -> a -> b) -> b -> UInt a -> b Source # foldl' :: (b -> a -> b) -> b -> UInt a -> b Source # foldr1 :: (a -> a -> a) -> UInt a -> a Source # foldl1 :: (a -> a -> a) -> UInt a -> a Source # toList :: UInt a -> [a] Source # null :: UInt a -> Bool Source # length :: UInt a -> Int Source # elem :: Eq a => a -> UInt a -> Bool Source # maximum :: Ord a => UInt a -> a Source # minimum :: Ord a => UInt a -> a Source # | |||||
| Functor (URec Int :: Type -> Type) | Since: base-4.9.0.0 | ||||
| Generic (URec Int p) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
| Show (URec Int p) | Since: base-4.9.0.0 | ||||
| Eq (URec Int p) | Since: base-4.9.0.0 | ||||
| Ord (URec Int p) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Generics Methods compare :: URec Int p -> URec Int p -> Ordering Source # (<) :: URec Int p -> URec Int p -> Bool Source # (<=) :: URec Int p -> URec Int p -> Bool Source # (>) :: URec Int p -> URec Int p -> Bool Source # (>=) :: URec Int p -> URec Int p -> Bool Source # | |||||
| data URec Int (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 | ||||
| type Rep1 (URec Int :: k -> Type) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Generics | |||||
| type Rep (URec Int p) | Since: base-4.9.0.0 | ||||
Defined in GHC.Internal.Generics | |||||
Instances
| SimpleType Short Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Short Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Short Source # | |
| Eq Short Source # | |
Instances
| SimpleType Byte Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| SchemaType Byte Source # | |
Defined in Text.XML.HaXml.Schema.Schema | |
| Show Byte Source # | |
| Eq Byte Source # | |
newtype NonNegativeInteger Source #
Instances
| SimpleType NonNegativeInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods | |
| SchemaType NonNegativeInteger Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser NonNegativeInteger Source # schemaTypeToXML :: String -> NonNegativeInteger -> [Content ()] Source # | |
| Show NonNegativeInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq NonNegativeInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: NonNegativeInteger -> NonNegativeInteger -> Bool Source # (/=) :: NonNegativeInteger -> NonNegativeInteger -> Bool Source # | |
newtype UnsignedLong Source #
Instances
| SimpleType UnsignedLong Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser UnsignedLong Source # simpleTypeText :: UnsignedLong -> String Source # | |
| SchemaType UnsignedLong Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser UnsignedLong Source # schemaTypeToXML :: String -> UnsignedLong -> [Content ()] Source # | |
| Show UnsignedLong Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq UnsignedLong Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: UnsignedLong -> UnsignedLong -> Bool Source # (/=) :: UnsignedLong -> UnsignedLong -> Bool Source # | |
newtype UnsignedInt Source #
Instances
| SimpleType UnsignedInt Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser UnsignedInt Source # simpleTypeText :: UnsignedInt -> String Source # | |
| SchemaType UnsignedInt Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser UnsignedInt Source # schemaTypeToXML :: String -> UnsignedInt -> [Content ()] Source # | |
| Show UnsignedInt Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq UnsignedInt Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: UnsignedInt -> UnsignedInt -> Bool Source # (/=) :: UnsignedInt -> UnsignedInt -> Bool Source # | |
newtype UnsignedShort Source #
Instances
| SimpleType UnsignedShort Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser UnsignedShort Source # simpleTypeText :: UnsignedShort -> String Source # | |
| SchemaType UnsignedShort Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser UnsignedShort Source # schemaTypeToXML :: String -> UnsignedShort -> [Content ()] Source # | |
| Show UnsignedShort Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq UnsignedShort Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: UnsignedShort -> UnsignedShort -> Bool Source # (/=) :: UnsignedShort -> UnsignedShort -> Bool Source # | |
newtype UnsignedByte Source #
Instances
| SimpleType UnsignedByte Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods acceptingParser :: TextParser UnsignedByte Source # simpleTypeText :: UnsignedByte -> String Source # | |
| SchemaType UnsignedByte Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser UnsignedByte Source # schemaTypeToXML :: String -> UnsignedByte -> [Content ()] Source # | |
| Show UnsignedByte Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq UnsignedByte Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: UnsignedByte -> UnsignedByte -> Bool Source # (/=) :: UnsignedByte -> UnsignedByte -> Bool Source # | |
newtype PositiveInteger Source #
Instances
| SimpleType PositiveInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods | |
| SchemaType PositiveInteger Source # | |
Defined in Text.XML.HaXml.Schema.Schema Methods parseSchemaType :: String -> XMLParser PositiveInteger Source # schemaTypeToXML :: String -> PositiveInteger -> [Content ()] Source # | |
| Show PositiveInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes | |
| Eq PositiveInteger Source # | |
Defined in Text.XML.HaXml.Schema.PrimitiveTypes Methods (==) :: PositiveInteger -> PositiveInteger -> Bool Source # (/=) :: PositiveInteger -> PositiveInteger -> Bool Source # | |