infix operator for applying an arrow to a list of trees
1.parameter f : the arrow
2.parameter ts : the list of trees
returns : list of results
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11
Modulehxt-9.3.1.22Haskell2010
This module provides all datatypes for DTD validation
infix operator for applying an arrow to a list of trees
1.parameter f : the arrow
2.parameter ts : the list of trees
returns : list of results
create an error message
module Text.XML.HXT.DOM.Interface
module Text.XML.HXT.Arrow.XmlArrow
Precomposition with a pure function (right-to-left variant).
Postcomposition with a pure function.
Postcomposition with a pure function (right-to-left variant).
Precomposition with a pure function.
Any instance of ArrowApply can be made into an instance of ArrowChoice by defining left = leftApp.
The identity arrow, which plays the role of return in arrow notation.
b
>───>Right-to-left composition. This is a synonym for (.), but it can be useful to make
the order of composition more apparent.
Left-to-right composition. This is useful if you want to write a morphism as a pipeline going from left to right.
The basic arrow class.
Instances should satisfy the following laws:
arr id = idarr (f >>> g) = arr f >>> arr gfirst (arr f) = arr (first f)first (f >>> g) = first f >>> first gfirst f >>> arr fst = arr fst >>> ffirst f >>> arr (id *** g) = arr (id *** g) >>> first ffirst (first f) >>> arr assoc = arr assoc >>> first fwhere
assoc ((a,b),c) = (a,(b,c))The other combinators have sensible default definitions, which may be overridden for efficiency.
arr :: (b -> c) -> a b cLift a function to an arrow.
b ╭───╮ c
>───┤ f ├───>
╰───╯first :: a b c -> a (b, d) (c, d)Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.
The default definition may be overridden with a more efficient version if desired.
b ╭─────╮ c
>───┼─ f ─┼───>
>───┼─────┼───>
d ╰─────╯ dsecond :: a b c -> a (d, b) (d, c)Send the second component of the input through the argument arrow, and copy the rest unchanged to the output.
The default definition may be overridden with a more efficient version if desired.
d ╭─────╮ d
>───┼─────┼───>
>───┼─ f ─┼───>
b ╰─────╯ c(***) :: a b c -> a b' c' -> a (b, b') (c, c')infixr 3Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.
The default definition may be overridden with a more efficient version if desired.
b ╭─────╮ c
>───┼─ f ─┼───>
>───┼─ g ─┼───>
b'╰─────╯ c'(&&&) :: a b c -> a b c' -> a b (c, c')infixr 3Fanout: send the input to both argument arrows and combine their output.
The default definition may be overridden with a more efficient version if desired.
╭───────╮ c
b │ ┌─ f ─┼───>
>───┼─┤ │
│ └─ g ─┼───>
╰───────╯ c'Arrow IOLADefined in hxt-9.3.1.22 · Control.Arrow.IOListArrowArrow LADefined in hxt-9.3.1.22 · Control.Arrow.ListArrowMonad m => Arrow (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowArrow (IOSLA s)Defined in hxt-9.3.1.22 · Control.Arrow.IOStateListArrowArrow (SLA s)Defined in hxt-9.3.1.22 · Control.Arrow.StateListArrowArrow (->)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowSome arrows allow application of arrow inputs to other inputs. Instances should satisfy the following laws:
first (arr (\x -> arr (\y -> (x,y)))) >>> app = idfirst (arr (g >>>)) >>> app = second g >>> appfirst (arr (>>> h)) >>> app = app >>> hSuch arrows are equivalent to monads (see ArrowMonad).
app :: a (a b c, b) cArrowApply IOLADefined in hxt-9.3.1.22 · Control.Arrow.IOListArrowArrowApply LADefined in hxt-9.3.1.22 · Control.Arrow.ListArrowMonad m => ArrowApply (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowArrowApply (IOSLA s)Defined in hxt-9.3.1.22 · Control.Arrow.IOStateListArrowArrowApply (SLA s)Defined in hxt-9.3.1.22 · Control.Arrow.StateListArrowArrowApply (->)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowChoice, for arrows that support it. This class underlies the
if and case constructs in arrow notation.
Instances should satisfy the following laws:
left (arr f) = arr (left f)left (f >>> g) = left f >>> left gf >>> arr Left = arr Left >>> left fleft f >>> arr (id +++ g) = arr (id +++ g) >>> left fleft (left f) >>> arr assocsum = arr assocsum >>> left fwhere
assocsum (Left (Left x)) = Left x
assocsum (Left (Right y)) = Right (Left y)
assocsum (Right z) = Right (Right z)The other combinators have sensible default definitions, which may be overridden for efficiency.
left :: a b c -> a (Either b d) (Either c d)Feed marked inputs through the argument arrow, passing the rest through unchanged to the output.
right :: a b c -> a (Either d b) (Either d c)A mirror image of left.
The default definition may be overridden with a more efficient version if desired.
(+++) :: a b c -> a b' c' -> a (Either b b') (Either c c')infixr 2Split the input between the two argument arrows, retagging and merging their outputs. Note that this is in general not a functor.
The default definition may be overridden with a more efficient version if desired.
(|||) :: a b d -> a c d -> a (Either b c) dinfixr 2Fanin: Split the input between the two argument arrows and merge their outputs.
The default definition may be overridden with a more efficient version if desired.
ArrowChoice IOLADefined in hxt-9.3.1.22 · Control.Arrow.IOListArrowArrowChoice LADefined in hxt-9.3.1.22 · Control.Arrow.ListArrowMonad m => ArrowChoice (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowArrowChoice (IOSLA s)Defined in hxt-9.3.1.22 · Control.Arrow.IOStateListArrowArrowChoice (SLA s)Defined in hxt-9.3.1.22 · Control.Arrow.StateListArrowArrowChoice (->)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowThe loop operator expresses computations in which an output value
is fed back as input, although the computation occurs only once.
It underlies the rec value recursion construct in arrow notation.
loop should satisfy the following laws:
second (loop f) = loop (arr assoc >>> second f >>> arr unassoc)
where
assoc ((a,b),c) = (a,(b,c))
unassoc (a,(b,c)) = ((a,b),c)loop :: a (b, d) (c, d) -> a b c ╭──────────────╮
b │ ╭───╮ │ c
>───┼─────┤ ├────┼───>
│ ┌─┤ ├─┐ │
│ d │ ╰───╯ │ │
│ └───<───┘ │
╰──────────────╯The ArrowApply class is equivalent to Monad: any monad gives rise to a Kleisli arrow, and any instance of ArrowApply defines a monad.
ArrowMonad (a () b)ArrowApply a => Monad (ArrowMonad a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowArrow a => Functor (ArrowMonad a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowArrow a => Applicative (ArrowMonad a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowArrowPlus a => Alternative (ArrowMonad a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.Arrow(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowA monoid on arrows.
ArrowPlus IOLADefined in hxt-9.3.1.22 · Control.Arrow.IOListArrowArrowPlus LADefined in hxt-9.3.1.22 · Control.Arrow.ListArrowMonadPlus m => ArrowPlus (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowArrowPlus (IOSLA s)Defined in hxt-9.3.1.22 · Control.Arrow.IOStateListArrowArrowPlus (SLA s)Defined in hxt-9.3.1.22 · Control.Arrow.StateListArrowzeroArrow :: a b cArrowZero IOLADefined in hxt-9.3.1.22 · Control.Arrow.IOListArrowArrowZero LADefined in hxt-9.3.1.22 · Control.Arrow.ListArrowMonadPlus m => ArrowZero (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowArrowZero (IOSLA s)Defined in hxt-9.3.1.22 · Control.Arrow.IOStateListArrowArrowZero (SLA s)Defined in hxt-9.3.1.22 · Control.Arrow.StateListArrowKleisli arrows of a monad.
KleislirunKleisli :: a -> m bMonad m => Category (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowGeneric1 (Kleisli m a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowMonad m => Arrow (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowMonad m => ArrowApply (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowMonad m => ArrowChoice (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowMonadFix m => ArrowLoop (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowMonadPlus m => ArrowPlus (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowMonadPlus m => ArrowZero (Kleisli m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowMonad m => Monad (Kleisli m a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowFunctor m => Functor (Kleisli m a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowApplicative m => Applicative (Kleisli m a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowAlternative m => Alternative (Kleisli m a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowMonadPlus m => MonadPlus (Kleisli m a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowGeneric (Kleisli m a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.Arrowtype Rep (Kleisli m a b) = D1 ('MetaData "Kleisli"
"GHC.Internal.Control.Arrow"
"ghc-internal"
'True) (C1 ('MetaCons "Kleisli"
'PrefixI 'True) (S1 ('MetaSel ('Just "runKleisli"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a -> m b))))Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.Arrowtype Rep1 (Kleisli m a) = D1 ('MetaData "Kleisli"
"GHC.Internal.Control.Arrow"
"ghc-internal"
'True) (C1 ('MetaCons "Kleisli"
'PrefixI 'True) (S1 ('MetaSel ('Just "runKleisli"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (FUN 'Many a :.: Rec1 m)))Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.Arrowmodule Control.Arrow.ArrowList
module Control.Arrow.ArrowIf
module Control.Arrow.ArrowState
module Control.Arrow.ArrowTree
module Control.Arrow.ListArrow
module Control.Arrow.StateListArrow