{-# LANGUAGE RankNTypes, KindSignatures, EmptyDataDecls,
MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, FunctionalDependencies, TypeFamilies #-}
{-# OPTIONS_HADDOCK prune #-}
module Control.Concurrent.SCC.Configurable
(
module Control.Concurrent.SCC.Configurable,
module Control.Concurrent.Configuration,
XML.XMLToken(..), XML.expandXMLEntity
)
where
import Prelude hiding (appendFile, even, id, join, last, sequence, (||), (&&))
import qualified Control.Category
import Data.Text (Text)
import Data.Monoid (Monoid, Sum)
import System.IO (Handle)
import Control.Monad.Coroutine
import Control.Monad.Parallel (MonadParallel(..))
import Data.Monoid.Null (MonoidNull)
import Data.Monoid.Factorial (FactorialMonoid)
import Data.Monoid.Cancellative (LeftCancellativeMonoid)
import Control.Concurrent.SCC.Streams
import Control.Concurrent.SCC.Types
import Control.Concurrent.SCC.Coercions (Coercible)
import qualified Control.Concurrent.SCC.Coercions as Coercion
import qualified Control.Concurrent.SCC.Combinators as Combinator
import qualified Control.Concurrent.SCC.Primitives as Primitive
import qualified Control.Concurrent.SCC.XML as XML
import Control.Concurrent.SCC.Primitives (OccurenceTag)
import Control.Concurrent.SCC.XML (XMLToken)
import Control.Concurrent.Configuration (Component, atomic)
import qualified Control.Concurrent.Configuration as Configuration
type PerformerComponent m r = Component (Performer m r)
type ConsumerComponent m x r = Component (Consumer m x r)
type ProducerComponent m x r = Component (Producer m x r)
type TransducerComponent m x y = Component (Transducer m x y)
type ParserComponent m x y = Component (Parser m x y)
type SplitterComponent m x = Component (Splitter m x)
ioCost :: Int
ioCost :: Int
ioCost = Int
5
coerce :: (Monad m, Coercible x y) => TransducerComponent m x y
coerce :: forall (m :: * -> *) x y.
(Monad m, Coercible x y) =>
TransducerComponent m x y
coerce = String -> Int -> Transducer m x y -> Component (Transducer m x y)
forall c. String -> Int -> c -> Component c
atomic String
"coerce" Int
1 Transducer m x y
forall x y (m :: * -> *).
(Coercible x y, Monad m) =>
Transducer m x y
forall (m :: * -> *). Monad m => Transducer m x y
Coercion.coerce
adaptConsumer :: (Monad m, Monoid x, Monoid y, Coercible x y) => ConsumerComponent m y r -> ConsumerComponent m x r
adaptConsumer :: forall (m :: * -> *) x y r.
(Monad m, Monoid x, Monoid y, Coercible x y) =>
ConsumerComponent m y r -> ConsumerComponent m x r
adaptConsumer = Int
-> String
-> (Consumer m y r -> Consumer m x r)
-> Component (Consumer m y r)
-> Component (Consumer m x r)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"adaptConsumer" Consumer m y r -> Consumer m x r
forall x y (m :: * -> *) r.
(Coercible x y, Monad m, Monoid x, Monoid y) =>
Consumer m y r -> Consumer m x r
forall (m :: * -> *) r.
(Monad m, Monoid x, Monoid y) =>
Consumer m y r -> Consumer m x r
Coercion.adaptConsumer
adaptProducer :: (Monad m, Monoid x, Monoid y, Coercible x y) => ProducerComponent m x r -> ProducerComponent m y r
adaptProducer :: forall (m :: * -> *) x y r.
(Monad m, Monoid x, Monoid y, Coercible x y) =>
ProducerComponent m x r -> ProducerComponent m y r
adaptProducer = Int
-> String
-> (Producer m x r -> Producer m y r)
-> Component (Producer m x r)
-> Component (Producer m y r)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"adaptProducer" Producer m x r -> Producer m y r
forall x y (m :: * -> *) r.
(Coercible x y, Monad m, Monoid x, Monoid y) =>
Producer m x r -> Producer m y r
forall (m :: * -> *) r.
(Monad m, Monoid x, Monoid y) =>
Producer m x r -> Producer m y r
Coercion.adaptProducer
adaptSplitter :: (Monad m, Monoid x, Monoid y, Coercible x y, Coercible y x) =>
SplitterComponent m x -> SplitterComponent m y
adaptSplitter :: forall (m :: * -> *) x y.
(Monad m, Monoid x, Monoid y, Coercible x y, Coercible y x) =>
SplitterComponent m x -> SplitterComponent m y
adaptSplitter = Int
-> String
-> (Splitter m x -> Splitter m y)
-> Component (Splitter m x)
-> Component (Splitter m y)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"adaptSplitter" Splitter m x -> Splitter m y
forall (m :: * -> *) x y b.
(Monad m, Monoid x, Monoid y, Coercible x y, Coercible y x) =>
Splitter m x -> Splitter m y
Coercion.adaptSplitter
fromStdIn :: ProducerComponent IO Text ()
fromStdIn :: ProducerComponent IO Text ()
fromStdIn = String
-> Int -> Producer IO Text () -> ProducerComponent IO Text ()
forall c. String -> Int -> c -> Component c
atomic String
"fromStdIn" Int
ioCost Producer IO Text ()
Primitive.fromStdIn
fromFile :: String -> ProducerComponent IO Text ()
fromFile :: String -> ProducerComponent IO Text ()
fromFile String
path = String
-> Int -> Producer IO Text () -> ProducerComponent IO Text ()
forall c. String -> Int -> c -> Component c
atomic String
"fromFile" Int
ioCost (String -> Producer IO Text ()
Primitive.fromFile String
path)
fromHandle :: Handle -> ProducerComponent IO Text ()
fromHandle :: Handle -> ProducerComponent IO Text ()
fromHandle Handle
handle = String
-> Int -> Producer IO Text () -> ProducerComponent IO Text ()
forall c. String -> Int -> c -> Component c
atomic String
"fromHandle" Int
ioCost (Handle -> Producer IO Text ()
Primitive.fromHandle Handle
handle)
toStdOut :: ConsumerComponent IO Text ()
toStdOut :: ConsumerComponent IO Text ()
toStdOut = String
-> Int -> Consumer IO Text () -> ConsumerComponent IO Text ()
forall c. String -> Int -> c -> Component c
atomic String
"toStdOut" Int
ioCost Consumer IO Text ()
Primitive.toStdOut
toFile :: String -> ConsumerComponent IO Text ()
toFile :: String -> ConsumerComponent IO Text ()
toFile String
path = String
-> Int -> Consumer IO Text () -> ConsumerComponent IO Text ()
forall c. String -> Int -> c -> Component c
atomic String
"toFile" Int
ioCost (String -> Consumer IO Text ()
Primitive.toFile String
path)
appendFile :: String -> ConsumerComponent IO Text ()
appendFile :: String -> ConsumerComponent IO Text ()
appendFile String
path = String
-> Int -> Consumer IO Text () -> ConsumerComponent IO Text ()
forall c. String -> Int -> c -> Component c
atomic String
"appendFile" Int
ioCost (String -> Consumer IO Text ()
Primitive.appendFile String
path)
toHandle :: Handle -> ConsumerComponent IO Text ()
toHandle :: Handle -> ConsumerComponent IO Text ()
toHandle Handle
handle = String
-> Int -> Consumer IO Text () -> ConsumerComponent IO Text ()
forall c. String -> Int -> c -> Component c
atomic String
"toHandle" Int
ioCost (Handle -> Consumer IO Text ()
Primitive.toHandle Handle
handle)
produceFrom :: (Monad m, MonoidNull x) => x -> ProducerComponent m x ()
produceFrom :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
x -> ProducerComponent m x ()
produceFrom x
l = String -> Int -> Producer m x () -> Component (Producer m x ())
forall c. String -> Int -> c -> Component c
atomic String
"produceFrom" Int
1 (x -> Producer m x ()
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
x -> Producer m x ()
Primitive.produceFrom x
l)
consumeInto :: (Monad m, Monoid x) => ConsumerComponent m x x
consumeInto :: forall (m :: * -> *) x.
(Monad m, Monoid x) =>
ConsumerComponent m x x
consumeInto = String -> Int -> Consumer m x x -> Component (Consumer m x x)
forall c. String -> Int -> c -> Component c
atomic String
"consumeInto" Int
1 Consumer m x x
forall (m :: * -> *) x. (Monad m, Monoid x) => Consumer m x x
Primitive.consumeInto
suppress :: Monad m => ConsumerComponent m x ()
suppress :: forall (m :: * -> *) x. Monad m => ConsumerComponent m x ()
suppress = String -> Int -> Consumer m x () -> Component (Consumer m x ())
forall c. String -> Int -> c -> Component c
atomic String
"suppress" Int
1 Consumer m x ()
forall (m :: * -> *) x. Monad m => Consumer m x ()
Primitive.suppress
erroneous :: (Monad m, MonoidNull x) => String -> ConsumerComponent m x ()
erroneous :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
String -> ConsumerComponent m x ()
erroneous String
message = String -> Int -> Consumer m x () -> Component (Consumer m x ())
forall c. String -> Int -> c -> Component c
atomic String
"erroneous" Int
0 (String -> Consumer m x ()
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
String -> Consumer m x ()
Primitive.erroneous String
message)
id :: (Monad m, Monoid x) => TransducerComponent m x x
id :: forall (m :: * -> *) x.
(Monad m, Monoid x) =>
TransducerComponent m x x
id = String -> Int -> Transducer m x x -> Component (Transducer m x x)
forall c. String -> Int -> c -> Component c
atomic String
"id" Int
1 (Transducer m x x -> Component (Transducer m x x))
-> Transducer m x x -> Component (Transducer m x x)
forall a b. (a -> b) -> a -> b
$ (forall (a1 :: * -> *) (a2 :: * -> *) (d :: * -> *).
OpenTransducer m a1 a2 d x x ())
-> Transducer m x x
forall (m :: * -> *) x y.
(forall (a1 :: * -> *) (a2 :: * -> *) (d :: * -> *).
OpenTransducer m a1 a2 d x y ())
-> Transducer m x y
Transducer Source m a1 x -> Sink m a2 x -> Coroutine d m ()
forall (a1 :: * -> *) (a2 :: * -> *) (d :: * -> *).
OpenTransducer m a1 a2 d x x ()
forall (m :: * -> *) (a1 :: * -> *) (a2 :: * -> *) (d :: * -> *) x.
(Monad m, Monoid x, AncestorFunctor a1 d, AncestorFunctor a2 d) =>
Source m a1 x -> Sink m a2 x -> Coroutine d m ()
pour_
unparse :: (Monad m, Monoid x) => TransducerComponent m [Markup b x] x
unparse :: forall (m :: * -> *) x b.
(Monad m, Monoid x) =>
TransducerComponent m [Markup b x] x
unparse = String
-> Int
-> Transducer m [Markup b x] x
-> Component (Transducer m [Markup b x] x)
forall c. String -> Int -> c -> Component c
atomic String
"unparse" Int
1 Transducer m [Markup b x] x
forall (m :: * -> *) x b.
(Monad m, Monoid x) =>
Transducer m [Markup b x] x
Primitive.unparse
parse :: (Monad m, Monoid x) => ParserComponent m x y
parse :: forall (m :: * -> *) x y.
(Monad m, Monoid x) =>
ParserComponent m x y
parse = String -> Int -> Parser m x y -> Component (Parser m x y)
forall c. String -> Int -> c -> Component c
atomic String
"parse" Int
1 Parser m x y
forall (m :: * -> *) x y. (Monad m, Monoid x) => Parser m x y
Primitive.parse
lowercase :: Monad m => TransducerComponent m String String
lowercase :: forall (m :: * -> *).
Monad m =>
TransducerComponent m String String
lowercase = String
-> Int
-> Transducer m String String
-> Component (Transducer m String String)
forall c. String -> Int -> c -> Component c
atomic String
"lowercase" Int
1 Transducer m String String
forall (m :: * -> *). Monad m => Transducer m String String
Primitive.lowercase
uppercase :: Monad m => TransducerComponent m String String
uppercase :: forall (m :: * -> *).
Monad m =>
TransducerComponent m String String
uppercase = String
-> Int
-> Transducer m String String
-> Component (Transducer m String String)
forall c. String -> Int -> c -> Component c
atomic String
"uppercase" Int
1 Transducer m String String
forall (m :: * -> *). Monad m => Transducer m String String
Primitive.uppercase
count :: (Monad m, FactorialMonoid x) => TransducerComponent m x [Integer]
count :: forall (m :: * -> *) x.
(Monad m, FactorialMonoid x) =>
TransducerComponent m x [Integer]
count = String
-> Int
-> Transducer m x [Integer]
-> Component (Transducer m x [Integer])
forall c. String -> Int -> c -> Component c
atomic String
"count" Int
1 Transducer m x [Integer]
forall (m :: * -> *) x.
(Monad m, FactorialMonoid x) =>
Transducer m x [Integer]
Primitive.count
toString :: (Monad m, Show x) => TransducerComponent m [x] [String]
toString :: forall (m :: * -> *) x.
(Monad m, Show x) =>
TransducerComponent m [x] [String]
toString = String
-> Int
-> Transducer m [x] [String]
-> Component (Transducer m [x] [String])
forall c. String -> Int -> c -> Component c
atomic String
"toString" Int
1 Transducer m [x] [String]
forall (m :: * -> *) x.
(Monad m, Show x) =>
Transducer m [x] [String]
Primitive.toString
parseSubstring :: (Monad m, Eq x, LeftCancellativeMonoid x, FactorialMonoid x) => x -> ParserComponent m x OccurenceTag
parseSubstring :: forall (m :: * -> *) x.
(Monad m, Eq x, LeftCancellativeMonoid x, FactorialMonoid x) =>
x -> ParserComponent m x OccurenceTag
parseSubstring x
list = String
-> Int
-> Parser m x OccurenceTag
-> Component (Parser m x OccurenceTag)
forall c. String -> Int -> c -> Component c
atomic String
"parseSubstring" Int
1 (x -> Parser m x OccurenceTag
forall (m :: * -> *) x.
(Monad m, Eq x, LeftReductiveMonoid x, FactorialMonoid x) =>
x -> Parser m x OccurenceTag
Primitive.parseSubstring x
list)
group :: (Monad m, Monoid x) => TransducerComponent m x [x]
group :: forall (m :: * -> *) x.
(Monad m, Monoid x) =>
TransducerComponent m x [x]
group = String
-> Int -> Transducer m x [x] -> Component (Transducer m x [x])
forall c. String -> Int -> c -> Component c
atomic String
"group" Int
1 Transducer m x [x]
forall (m :: * -> *) x. (Monad m, Monoid x) => Transducer m x [x]
Primitive.group
concatenate :: (Monad m, Monoid x) => TransducerComponent m [x] x
concatenate :: forall (m :: * -> *) x.
(Monad m, Monoid x) =>
TransducerComponent m [x] x
concatenate = String
-> Int -> Transducer m [x] x -> Component (Transducer m [x] x)
forall c. String -> Int -> c -> Component c
atomic String
"concatenate" Int
1 Transducer m [x] x
forall (m :: * -> *) x. (Monad m, Monoid x) => Transducer m [x] x
Primitive.concatenate
concatSeparate :: (Monad m, MonoidNull x) => x -> TransducerComponent m [x] x
concatSeparate :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
x -> TransducerComponent m [x] x
concatSeparate x
separator = String
-> Int -> Transducer m [x] x -> Component (Transducer m [x] x)
forall c. String -> Int -> c -> Component c
atomic String
"concatSeparate" Int
1 (x -> Transducer m [x] x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
x -> Transducer m [x] x
Primitive.concatSeparate x
separator)
everything :: Monad m => SplitterComponent m x
everything :: forall (m :: * -> *) x. Monad m => SplitterComponent m x
everything = String -> Int -> Splitter m x -> Component (Splitter m x)
forall c. String -> Int -> c -> Component c
atomic String
"everything" Int
1 Splitter m x
forall (m :: * -> *) x. Monad m => Splitter m x
Primitive.everything
nothing :: (Monad m, Monoid x) => SplitterComponent m x
nothing :: forall (m :: * -> *) x.
(Monad m, Monoid x) =>
SplitterComponent m x
nothing = String -> Int -> Splitter m x -> Component (Splitter m x)
forall c. String -> Int -> c -> Component c
atomic String
"nothing" Int
1 Splitter m x
forall (m :: * -> *) x. (Monad m, Monoid x) => Splitter m x
Primitive.nothing
marked :: (Monad m, Eq y) => SplitterComponent m [Markup y x]
marked :: forall (m :: * -> *) y x.
(Monad m, Eq y) =>
SplitterComponent m [Markup y x]
marked = String
-> Int
-> Splitter m [Markup y x]
-> Component (Splitter m [Markup y x])
forall c. String -> Int -> c -> Component c
atomic String
"marked" Int
1 Splitter m [Markup y x]
forall (m :: * -> *) x y.
(Monad m, Eq y) =>
Splitter m [Markup y x]
Primitive.marked
markedContent :: (Monad m, Eq y) => SplitterComponent m [Markup y x]
markedContent :: forall (m :: * -> *) y x.
(Monad m, Eq y) =>
SplitterComponent m [Markup y x]
markedContent = String
-> Int
-> Splitter m [Markup y x]
-> Component (Splitter m [Markup y x])
forall c. String -> Int -> c -> Component c
atomic String
"markedContent" Int
1 Splitter m [Markup y x]
forall (m :: * -> *) x y.
(Monad m, Eq y) =>
Splitter m [Markup y x]
Primitive.markedContent
markedWith :: (Monad m, Eq y) => (y -> Bool) -> SplitterComponent m [Markup y x]
markedWith :: forall (m :: * -> *) y x.
(Monad m, Eq y) =>
(y -> Bool) -> SplitterComponent m [Markup y x]
markedWith y -> Bool
selector = String
-> Int
-> Splitter m [Markup y x]
-> Component (Splitter m [Markup y x])
forall c. String -> Int -> c -> Component c
atomic String
"markedWith" Int
1 ((y -> Bool) -> Splitter m [Markup y x]
forall (m :: * -> *) x y.
(Monad m, Eq y) =>
(y -> Bool) -> Splitter m [Markup y x]
Primitive.markedWith y -> Bool
selector)
contentMarkedWith :: (Monad m, Eq y) => (y -> Bool) -> SplitterComponent m [Markup y x]
contentMarkedWith :: forall (m :: * -> *) y x.
(Monad m, Eq y) =>
(y -> Bool) -> SplitterComponent m [Markup y x]
contentMarkedWith y -> Bool
selector = String
-> Int
-> Splitter m [Markup y x]
-> Component (Splitter m [Markup y x])
forall c. String -> Int -> c -> Component c
atomic String
"contentMarkedWith" Int
1 ((y -> Bool) -> Splitter m [Markup y x]
forall (m :: * -> *) x y.
(Monad m, Eq y) =>
(y -> Bool) -> Splitter m [Markup y x]
Primitive.contentMarkedWith y -> Bool
selector)
one :: (Monad m, FactorialMonoid x) => SplitterComponent m x
one :: forall (m :: * -> *) x.
(Monad m, FactorialMonoid x) =>
SplitterComponent m x
one = String -> Int -> Splitter m x -> Component (Splitter m x)
forall c. String -> Int -> c -> Component c
atomic String
"one" Int
1 Splitter m x
forall (m :: * -> *) x.
(Monad m, FactorialMonoid x) =>
Splitter m x
Primitive.one
substring :: (Monad m, Eq x, LeftCancellativeMonoid x, FactorialMonoid x) => x -> SplitterComponent m x
substring :: forall (m :: * -> *) x.
(Monad m, Eq x, LeftCancellativeMonoid x, FactorialMonoid x) =>
x -> SplitterComponent m x
substring x
list = String -> Int -> Splitter m x -> Component (Splitter m x)
forall c. String -> Int -> c -> Component c
atomic String
"substring" Int
1 (x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, Eq x, LeftReductiveMonoid x, FactorialMonoid x) =>
x -> Splitter m x
Primitive.substring x
list)
whitespace :: Monad m => SplitterComponent m String
whitespace :: forall (m :: * -> *). Monad m => SplitterComponent m String
whitespace = String -> Int -> Splitter m String -> Component (Splitter m String)
forall c. String -> Int -> c -> Component c
atomic String
"whitespace" Int
1 Splitter m String
forall (m :: * -> *). Monad m => Splitter m String
Primitive.whitespace
letters :: Monad m => SplitterComponent m String
letters :: forall (m :: * -> *). Monad m => SplitterComponent m String
letters = String -> Int -> Splitter m String -> Component (Splitter m String)
forall c. String -> Int -> c -> Component c
atomic String
"letters" Int
1 Splitter m String
forall (m :: * -> *). Monad m => Splitter m String
Primitive.letters
digits :: Monad m => SplitterComponent m String
digits :: forall (m :: * -> *). Monad m => SplitterComponent m String
digits = String -> Int -> Splitter m String -> Component (Splitter m String)
forall c. String -> Int -> c -> Component c
atomic String
"digits" Int
1 Splitter m String
forall (m :: * -> *). Monad m => Splitter m String
Primitive.digits
nonEmptyLine :: Monad m => SplitterComponent m String
nonEmptyLine :: forall (m :: * -> *). Monad m => SplitterComponent m String
nonEmptyLine = String -> Int -> Splitter m String -> Component (Splitter m String)
forall c. String -> Int -> c -> Component c
atomic String
"nonEmptyLine" Int
1 Splitter m String
forall (m :: * -> *). Monad m => Splitter m String
Primitive.nonEmptyLine
line :: Monad m => SplitterComponent m String
line :: forall (m :: * -> *). Monad m => SplitterComponent m String
line = String -> Int -> Splitter m String -> Component (Splitter m String)
forall c. String -> Int -> c -> Component c
atomic String
"line" Int
1 Splitter m String
forall (m :: * -> *). Monad m => Splitter m String
Primitive.line
consumeBy :: (Monad m) => ConsumerComponent m x r -> TransducerComponent m x y
consumeBy :: forall (m :: * -> *) x r y.
Monad m =>
ConsumerComponent m x r -> TransducerComponent m x y
consumeBy = Int
-> String
-> (Consumer m x r -> Transducer m x y)
-> Component (Consumer m x r)
-> Component (Transducer m x y)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"consumeBy" Consumer m x r -> Transducer m x y
forall (m :: * -> *) x y r.
Monad m =>
Consumer m x r -> Transducer m x y
Combinator.consumeBy
(>->) :: (MonadParallel m, PipeableComponentPair m w c1 c2 c3) =>
Component c1 -> Component c2 -> Component c3
>-> :: forall (m :: * -> *) w c1 c2 c3.
(MonadParallel m, PipeableComponentPair m w c1 c2 c3) =>
Component c1 -> Component c2 -> Component c3
(>->) = String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
">->" PairBinder m -> c1 -> c2 -> c3
forall (m :: * -> *) w c1 c2 c3.
PipeableComponentPair m w c1 c2 c3 =>
PairBinder m -> c1 -> c2 -> c3
compose
class CompatibleSignature c cons (m :: * -> *) input output | c -> cons m
class AnyListOrUnit c
instance AnyListOrUnit [x]
instance AnyListOrUnit ()
instance (AnyListOrUnit x, AnyListOrUnit y) => CompatibleSignature (Performer m r) (PerformerType r) m x y
instance AnyListOrUnit y => CompatibleSignature (Consumer m x r) (ConsumerType r) m [x] y
instance AnyListOrUnit y => CompatibleSignature (Producer m x r) (ProducerType r) m y [x]
instance CompatibleSignature (Transducer m x y) TransducerType m [x] [y]
data PerformerType r
data ConsumerType r
data ProducerType r
data TransducerType
join :: (MonadParallel m, Combinator.JoinableComponentPair t1 t2 t3 m x y c1 c2 c3) =>
Component c1 -> Component c2 -> Component c3
join :: forall (m :: * -> *) t1 t2 t3 x y c1 c2 c3.
(MonadParallel m, JoinableComponentPair t1 t2 t3 m x y c1 c2 c3) =>
Component c1 -> Component c2 -> Component c3
join = String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"join" PairBinder m -> c1 -> c2 -> c3
forall t1 t2 t3 (m :: * -> *) x y c1 c2 c3.
JoinableComponentPair t1 t2 t3 m x y c1 c2 c3 =>
PairBinder m -> c1 -> c2 -> c3
Combinator.join
sequence :: Combinator.JoinableComponentPair t1 t2 t3 m x y c1 c2 c3 => Component c1 -> Component c2 -> Component c3
sequence :: forall t1 t2 t3 (m :: * -> *) x y c1 c2 c3.
JoinableComponentPair t1 t2 t3 m x y c1 c2 c3 =>
Component c1 -> Component c2 -> Component c3
sequence = String
-> (c1 -> c2 -> c3) -> Component c1 -> Component c2 -> Component c3
forall c1 c2 c3.
String
-> (c1 -> c2 -> c3) -> Component c1 -> Component c2 -> Component c3
Configuration.liftSequentialPair String
"sequence" c1 -> c2 -> c3
forall t1 t2 t3 (m :: * -> *) x y c1 c2 c3.
JoinableComponentPair t1 t2 t3 m x y c1 c2 c3 =>
c1 -> c2 -> c3
Combinator.sequence
prepend :: (Monad m) => ProducerComponent m x r -> TransducerComponent m x x
prepend :: forall (m :: * -> *) x r.
Monad m =>
ProducerComponent m x r -> TransducerComponent m x x
prepend = Int
-> String
-> (Producer m x r -> Transducer m x x)
-> Component (Producer m x r)
-> Component (Transducer m x x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"prepend" Producer m x r -> Transducer m x x
forall (m :: * -> *) x r.
Monad m =>
Producer m x r -> Transducer m x x
Combinator.prepend
append :: (Monad m) => ProducerComponent m x r -> TransducerComponent m x x
append :: forall (m :: * -> *) x r.
Monad m =>
ProducerComponent m x r -> TransducerComponent m x x
append = Int
-> String
-> (Producer m x r -> Transducer m x x)
-> Component (Producer m x r)
-> Component (Transducer m x x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"append" Producer m x r -> Transducer m x x
forall (m :: * -> *) x r.
Monad m =>
Producer m x r -> Transducer m x x
Combinator.append
substitute :: (Monad m, Monoid x) => ProducerComponent m y r -> TransducerComponent m x y
substitute :: forall (m :: * -> *) x y r.
(Monad m, Monoid x) =>
ProducerComponent m y r -> TransducerComponent m x y
substitute = Int
-> String
-> (Producer m y r -> Transducer m x y)
-> Component (Producer m y r)
-> Component (Transducer m x y)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"substitute" Producer m y r -> Transducer m x y
forall (m :: * -> *) x y r.
(Monad m, Monoid x) =>
Producer m y r -> Transducer m x y
Combinator.substitute
snot :: (Monad m, Monoid x) => SplitterComponent m x -> SplitterComponent m x
snot :: forall (m :: * -> *) x.
(Monad m, Monoid x) =>
SplitterComponent m x -> SplitterComponent m x
snot = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"not" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, Monoid x) =>
Splitter m x -> Splitter m x
Combinator.sNot
(>&) :: (MonadParallel m, Monoid x) => SplitterComponent m x -> SplitterComponent m x -> SplitterComponent m x
>& :: forall (m :: * -> *) x.
(MonadParallel m, Monoid x) =>
SplitterComponent m x
-> SplitterComponent m x -> SplitterComponent m x
(>&) = String
-> (PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
">&" PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, Monoid x) =>
PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
Combinator.sAnd
(>|) :: (MonadParallel m, Monoid x) => SplitterComponent m x -> SplitterComponent m x -> SplitterComponent m x
>| :: forall (m :: * -> *) x.
(MonadParallel m, Monoid x) =>
SplitterComponent m x
-> SplitterComponent m x -> SplitterComponent m x
(>|) = String
-> (PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
">&" PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, Monoid x) =>
PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
Combinator.sOr
(&&) :: (MonadParallel m, FactorialMonoid x) => SplitterComponent m x -> SplitterComponent m x -> SplitterComponent m x
&& :: forall (m :: * -> *) x.
(MonadParallel m, FactorialMonoid x) =>
SplitterComponent m x
-> SplitterComponent m x -> SplitterComponent m x
(&&) = String
-> (PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"&&" PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, FactorialMonoid x) =>
PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
Combinator.pAnd
(||) :: (MonadParallel m, FactorialMonoid x) => SplitterComponent m x -> SplitterComponent m x -> SplitterComponent m x
|| :: forall (m :: * -> *) x.
(MonadParallel m, FactorialMonoid x) =>
SplitterComponent m x
-> SplitterComponent m x -> SplitterComponent m x
(||) = String
-> (PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"||" PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, FactorialMonoid x) =>
PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
Combinator.pOr
ifs :: (MonadParallel m, Branching c m x ()) => SplitterComponent m x -> Component c -> Component c -> Component c
ifs :: forall (m :: * -> *) c x.
(MonadParallel m, Branching c m x ()) =>
SplitterComponent m x -> Component c -> Component c -> Component c
ifs = String
-> (PairBinder m -> Splitter m x -> c -> c -> c)
-> Component (Splitter m x)
-> Component c
-> Component c
-> Component c
forall (m :: * -> *) c1 c2 c3 c4.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3 -> c4)
-> Component c1
-> Component c2
-> Component c3
-> Component c4
parallelRouterAndBranches String
"ifs" PairBinder m -> Splitter m x -> c -> c -> c
forall c (m :: * -> *) x.
(Monad m, Branching c m x ()) =>
PairBinder m -> Splitter m x -> c -> c -> c
Combinator.ifs
wherever :: (MonadParallel m, Monoid x) =>
TransducerComponent m x x -> SplitterComponent m x -> TransducerComponent m x x
wherever :: forall (m :: * -> *) x.
(MonadParallel m, Monoid x) =>
TransducerComponent m x x
-> SplitterComponent m x -> TransducerComponent m x x
wherever = String
-> (PairBinder m
-> Transducer m x x -> Splitter m x -> Transducer m x x)
-> Component (Transducer m x x)
-> Component (Splitter m x)
-> Component (Transducer m x x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"wherever" PairBinder m
-> Transducer m x x -> Splitter m x -> Transducer m x x
forall (m :: * -> *) x.
(Monad m, Monoid x) =>
PairBinder m
-> Transducer m x x -> Splitter m x -> Transducer m x x
Combinator.wherever
unless :: (MonadParallel m, Monoid x) =>
TransducerComponent m x x -> SplitterComponent m x -> TransducerComponent m x x
unless :: forall (m :: * -> *) x.
(MonadParallel m, Monoid x) =>
TransducerComponent m x x
-> SplitterComponent m x -> TransducerComponent m x x
unless = String
-> (PairBinder m
-> Transducer m x x -> Splitter m x -> Transducer m x x)
-> Component (Transducer m x x)
-> Component (Splitter m x)
-> Component (Transducer m x x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"unless" PairBinder m
-> Transducer m x x -> Splitter m x -> Transducer m x x
forall (m :: * -> *) x.
(Monad m, Monoid x) =>
PairBinder m
-> Transducer m x x -> Splitter m x -> Transducer m x x
Combinator.unless
select :: (Monad m, Monoid x) => SplitterComponent m x -> TransducerComponent m x x
select :: forall (m :: * -> *) x.
(Monad m, Monoid x) =>
SplitterComponent m x -> TransducerComponent m x x
select = Int
-> String
-> (Splitter m x -> Transducer m x x)
-> Component (Splitter m x)
-> Component (Transducer m x x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"select" Splitter m x -> Transducer m x x
forall (m :: * -> *) x.
(Monad m, Monoid x) =>
Splitter m x -> Transducer m x x
Combinator.select
while :: (MonadParallel m, MonoidNull x) =>
TransducerComponent m x x -> SplitterComponent m x -> TransducerComponent m x x
while :: forall (m :: * -> *) x.
(MonadParallel m, MonoidNull x) =>
TransducerComponent m x x
-> SplitterComponent m x -> TransducerComponent m x x
while TransducerComponent m x x
t SplitterComponent m x
s = String
-> (PairBinder m
-> (Transducer m x x, Splitter m x)
-> Transducer m x x
-> Transducer m x x)
-> Component (Transducer m x x, Splitter m x)
-> TransducerComponent m x x
forall (m :: * -> *) c1 c2.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c2) -> Component c1 -> Component c2
recursiveComponentTree String
"while" (\PairBinder m
binder-> (Transducer m x x
-> Splitter m x -> Transducer m x x -> Transducer m x x)
-> (Transducer m x x, Splitter m x)
-> Transducer m x x
-> Transducer m x x
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry (PairBinder m
-> Transducer m x x
-> Splitter m x
-> Transducer m x x
-> Transducer m x x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
PairBinder m
-> Transducer m x x
-> Splitter m x
-> Transducer m x x
-> Transducer m x x
Combinator.while (x -> y -> m r) -> m x -> m y -> m r
PairBinder m
binder)) (Component (Transducer m x x, Splitter m x)
-> TransducerComponent m x x)
-> Component (Transducer m x x, Splitter m x)
-> TransducerComponent m x x
forall a b. (a -> b) -> a -> b
$
String
-> (Transducer m x x
-> Splitter m x -> (Transducer m x x, Splitter m x))
-> TransducerComponent m x x
-> SplitterComponent m x
-> Component (Transducer m x x, Splitter m x)
forall c1 c2 c3.
String
-> (c1 -> c2 -> c3) -> Component c1 -> Component c2 -> Component c3
Configuration.liftSequentialPair String
"pair" (,) TransducerComponent m x x
t SplitterComponent m x
s
nestedIn :: (MonadParallel m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x -> SplitterComponent m x
nestedIn :: forall (m :: * -> *) x.
(MonadParallel m, MonoidNull x) =>
SplitterComponent m x
-> SplitterComponent m x -> SplitterComponent m x
nestedIn SplitterComponent m x
s1 SplitterComponent m x
s2 = String
-> (PairBinder m
-> (Splitter m x, Splitter m x) -> Splitter m x -> Splitter m x)
-> Component (Splitter m x, Splitter m x)
-> SplitterComponent m x
forall (m :: * -> *) c1 c2.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c2) -> Component c1 -> Component c2
recursiveComponentTree String
"nestedIn" (\PairBinder m
binder-> (Splitter m x -> Splitter m x -> Splitter m x -> Splitter m x)
-> (Splitter m x, Splitter m x) -> Splitter m x -> Splitter m x
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry (PairBinder m
-> Splitter m x -> Splitter m x -> Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
PairBinder m
-> Splitter m x -> Splitter m x -> Splitter m x -> Splitter m x
Combinator.nestedIn (x -> y -> m r) -> m x -> m y -> m r
PairBinder m
binder)) (Component (Splitter m x, Splitter m x) -> SplitterComponent m x)
-> Component (Splitter m x, Splitter m x) -> SplitterComponent m x
forall a b. (a -> b) -> a -> b
$
String
-> (Splitter m x -> Splitter m x -> (Splitter m x, Splitter m x))
-> SplitterComponent m x
-> SplitterComponent m x
-> Component (Splitter m x, Splitter m x)
forall c1 c2 c3.
String
-> (c1 -> c2 -> c3) -> Component c1 -> Component c2 -> Component c3
Configuration.liftSequentialPair String
"pair" (,) SplitterComponent m x
s1 SplitterComponent m x
s2
foreach :: (MonadParallel m, MonoidNull x, Branching c m x ()) =>
SplitterComponent m x -> Component c -> Component c -> Component c
foreach :: forall (m :: * -> *) x c.
(MonadParallel m, MonoidNull x, Branching c m x ()) =>
SplitterComponent m x -> Component c -> Component c -> Component c
foreach = String
-> (PairBinder m -> Splitter m x -> c -> c -> c)
-> Component (Splitter m x)
-> Component c
-> Component c
-> Component c
forall (m :: * -> *) c1 c2 c3 c4.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3 -> c4)
-> Component c1
-> Component c2
-> Component c3
-> Component c4
parallelRouterAndBranches String
"foreach" PairBinder m -> Splitter m x -> c -> c -> c
forall (m :: * -> *) x c.
(Monad m, MonoidNull x, Branching c m x ()) =>
PairBinder m -> Splitter m x -> c -> c -> c
Combinator.foreach
having :: (MonadParallel m, MonoidNull x, MonoidNull y, Coercible x y) =>
SplitterComponent m x -> SplitterComponent m y -> SplitterComponent m x
having :: forall (m :: * -> *) x y.
(MonadParallel m, MonoidNull x, MonoidNull y, Coercible x y) =>
SplitterComponent m x
-> SplitterComponent m y -> SplitterComponent m x
having = String
-> (PairBinder m -> Splitter m x -> Splitter m y -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m y)
-> Component (Splitter m x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"having" PairBinder m -> Splitter m x -> Splitter m y -> Splitter m x
forall (m :: * -> *) x y.
(Monad m, MonoidNull x, MonoidNull y, Coercible x y) =>
PairBinder m -> Splitter m x -> Splitter m y -> Splitter m x
Combinator.having
havingOnly :: (MonadParallel m, MonoidNull x, MonoidNull y, Coercible x y) =>
SplitterComponent m x -> SplitterComponent m y -> SplitterComponent m x
havingOnly :: forall (m :: * -> *) x y.
(MonadParallel m, MonoidNull x, MonoidNull y, Coercible x y) =>
SplitterComponent m x
-> SplitterComponent m y -> SplitterComponent m x
havingOnly = String
-> (PairBinder m -> Splitter m x -> Splitter m y -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m y)
-> Component (Splitter m x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"havingOnly" PairBinder m -> Splitter m x -> Splitter m y -> Splitter m x
forall (m :: * -> *) x y.
(Monad m, MonoidNull x, MonoidNull y, Coercible x y) =>
PairBinder m -> Splitter m x -> Splitter m y -> Splitter m x
Combinator.havingOnly
followedBy :: (MonadParallel m, FactorialMonoid x) =>
SplitterComponent m x -> SplitterComponent m x -> SplitterComponent m x
followedBy :: forall (m :: * -> *) x.
(MonadParallel m, FactorialMonoid x) =>
SplitterComponent m x
-> SplitterComponent m x -> SplitterComponent m x
followedBy = String
-> (PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"followedBy" PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, FactorialMonoid x) =>
PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
Combinator.followedBy
even :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
even :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
even = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"even" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.even
first :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
first :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
first = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"first" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.first
uptoFirst :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
uptoFirst :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
uptoFirst = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"uptoFirst" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.uptoFirst
prefix :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
prefix :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
prefix = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"prefix" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.prefix
last :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
last :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
last = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"last" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.last
lastAndAfter :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
lastAndAfter :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
lastAndAfter = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"lastAndAfter" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.lastAndAfter
suffix :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
suffix :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
suffix = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"suffix" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.suffix
startOf :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
startOf :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
startOf = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"startOf" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.startOf
endOf :: (Monad m, MonoidNull x) => SplitterComponent m x -> SplitterComponent m x
endOf :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> SplitterComponent m x
endOf = Int
-> String
-> (Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"endOf" Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Splitter m x
Combinator.endOf
(...) :: (MonadParallel m, FactorialMonoid x) => SplitterComponent m x -> SplitterComponent m x -> SplitterComponent m x
... :: forall (m :: * -> *) x.
(MonadParallel m, FactorialMonoid x) =>
SplitterComponent m x
-> SplitterComponent m x -> SplitterComponent m x
(...) = String
-> (PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
-> Component (Splitter m x)
forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
"..." PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
forall (m :: * -> *) x.
(Monad m, FactorialMonoid x) =>
PairBinder m -> Splitter m x -> Splitter m x -> Splitter m x
Combinator.between
parseRegions :: (Monad m, MonoidNull x) => SplitterComponent m x -> ParserComponent m x ()
parseRegions :: forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
SplitterComponent m x -> ParserComponent m x ()
parseRegions = Int
-> String
-> (Splitter m x -> Parser m x ())
-> Component (Splitter m x)
-> Component (Parser m x ())
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
1 String
"parseRegions" Splitter m x -> Parser m x ()
forall (m :: * -> *) x.
(Monad m, MonoidNull x) =>
Splitter m x -> Parser m x ()
Combinator.parseRegions
xmlTokens :: Monad m => SplitterComponent m Text
xmlTokens :: forall (m :: * -> *). Monad m => SplitterComponent m Text
xmlTokens = String -> Int -> Splitter m Text -> Component (Splitter m Text)
forall c. String -> Int -> c -> Component c
atomic String
"XML.tokens" Int
1 Splitter m Text
forall (m :: * -> *). Monad m => Splitter m Text
XML.xmlTokens
xmlParseTokens :: MonadParallel m => TransducerComponent m Text [Markup XMLToken Text]
xmlParseTokens :: forall (m :: * -> *).
MonadParallel m =>
TransducerComponent m Text [Markup XMLToken Text]
xmlParseTokens = String
-> Int
-> Transducer m Text [Markup XMLToken Text]
-> Component (Transducer m Text [Markup XMLToken Text])
forall c. String -> Int -> c -> Component c
atomic String
"XML.parseTokens" Int
1 Transducer m Text [Markup XMLToken Text]
forall (m :: * -> *).
Monad m =>
Transducer m Text [Markup XMLToken Text]
XML.parseXMLTokens
xmlElement :: Monad m => SplitterComponent m [Markup XMLToken Text]
xmlElement :: forall (m :: * -> *).
Monad m =>
SplitterComponent m [Markup XMLToken Text]
xmlElement = String
-> Int
-> Splitter m [Markup XMLToken Text]
-> Component (Splitter m [Markup XMLToken Text])
forall c. String -> Int -> c -> Component c
atomic String
"XML.element" Int
1 Splitter m [Markup XMLToken Text]
forall (m :: * -> *). Monad m => Splitter m [Markup XMLToken Text]
XML.xmlElement
xmlElementContent :: Monad m => SplitterComponent m [Markup XMLToken Text]
xmlElementContent :: forall (m :: * -> *).
Monad m =>
SplitterComponent m [Markup XMLToken Text]
xmlElementContent = String
-> Int
-> Splitter m [Markup XMLToken Text]
-> Component (Splitter m [Markup XMLToken Text])
forall c. String -> Int -> c -> Component c
atomic String
"XML.elementContent" Int
1 Splitter m [Markup XMLToken Text]
forall (m :: * -> *). Monad m => Splitter m [Markup XMLToken Text]
XML.xmlElementContent
xmlElementHavingTagWith :: MonadParallel m =>
SplitterComponent m [Markup XMLToken Text] -> SplitterComponent m [Markup XMLToken Text]
xmlElementHavingTagWith :: forall (m :: * -> *).
MonadParallel m =>
SplitterComponent m [Markup XMLToken Text]
-> SplitterComponent m [Markup XMLToken Text]
xmlElementHavingTagWith = Int
-> String
-> (Splitter m [Markup XMLToken Text]
-> Splitter m [Markup XMLToken Text])
-> Component (Splitter m [Markup XMLToken Text])
-> Component (Splitter m [Markup XMLToken Text])
forall c1 c2.
Int -> String -> (c1 -> c2) -> Component c1 -> Component c2
Configuration.lift Int
2 String
"XML.elementHavingTag" Splitter m [Markup XMLToken Text]
-> Splitter m [Markup XMLToken Text]
forall (m :: * -> *) b.
Monad m =>
Splitter m [Markup XMLToken Text]
-> Splitter m [Markup XMLToken Text]
XML.xmlElementHavingTagWith
xmlAttribute :: Monad m => SplitterComponent m [Markup XMLToken Text]
xmlAttribute :: forall (m :: * -> *).
Monad m =>
SplitterComponent m [Markup XMLToken Text]
xmlAttribute = String
-> Int
-> Splitter m [Markup XMLToken Text]
-> Component (Splitter m [Markup XMLToken Text])
forall c. String -> Int -> c -> Component c
atomic String
"XML.attribute" Int
1 Splitter m [Markup XMLToken Text]
forall (m :: * -> *). Monad m => Splitter m [Markup XMLToken Text]
XML.xmlAttribute
xmlElementName :: Monad m => SplitterComponent m [Markup XMLToken Text]
xmlElementName :: forall (m :: * -> *).
Monad m =>
SplitterComponent m [Markup XMLToken Text]
xmlElementName = String
-> Int
-> Splitter m [Markup XMLToken Text]
-> Component (Splitter m [Markup XMLToken Text])
forall c. String -> Int -> c -> Component c
atomic String
"XML.elementName" Int
1 Splitter m [Markup XMLToken Text]
forall (m :: * -> *). Monad m => Splitter m [Markup XMLToken Text]
XML.xmlElementName
xmlAttributeName :: Monad m => SplitterComponent m [Markup XMLToken Text]
xmlAttributeName :: forall (m :: * -> *).
Monad m =>
SplitterComponent m [Markup XMLToken Text]
xmlAttributeName = String
-> Int
-> Splitter m [Markup XMLToken Text]
-> Component (Splitter m [Markup XMLToken Text])
forall c. String -> Int -> c -> Component c
atomic String
"XML.attributeName" Int
1 Splitter m [Markup XMLToken Text]
forall (m :: * -> *). Monad m => Splitter m [Markup XMLToken Text]
XML.xmlAttributeName
xmlAttributeValue :: Monad m => SplitterComponent m [Markup XMLToken Text]
xmlAttributeValue :: forall (m :: * -> *).
Monad m =>
SplitterComponent m [Markup XMLToken Text]
xmlAttributeValue = String
-> Int
-> Splitter m [Markup XMLToken Text]
-> Component (Splitter m [Markup XMLToken Text])
forall c. String -> Int -> c -> Component c
atomic String
"XML.attributeValue" Int
1 Splitter m [Markup XMLToken Text]
forall (m :: * -> *). Monad m => Splitter m [Markup XMLToken Text]
XML.xmlAttributeValue
liftParallelPair :: MonadParallel m =>
String -> (PairBinder m -> c1 -> c2 -> c3) -> Component c1 -> Component c2 -> Component c3
liftParallelPair :: forall (m :: * -> *) c1 c2 c3.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
liftParallelPair String
name PairBinder m -> c1 -> c2 -> c3
combinator = String
-> (Bool -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
forall c1 c2 c3.
String
-> (Bool -> c1 -> c2 -> c3)
-> Component c1
-> Component c2
-> Component c3
Configuration.liftParallelPair String
name (\Bool
b-> PairBinder m -> c1 -> c2 -> c3
combinator (PairBinder m -> c1 -> c2 -> c3) -> PairBinder m -> c1 -> c2 -> c3
forall a b. (a -> b) -> a -> b
$ Bool -> PairBinder m
forall (m :: * -> *). MonadParallel m => Bool -> PairBinder m
chooseBinder Bool
b)
parallelRouterAndBranches :: MonadParallel m =>
String -> (PairBinder m -> c1 -> c2 -> c3 -> c4)
-> Component c1 -> Component c2 -> Component c3 -> Component c4
parallelRouterAndBranches :: forall (m :: * -> *) c1 c2 c3 c4.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c3 -> c4)
-> Component c1
-> Component c2
-> Component c3
-> Component c4
parallelRouterAndBranches String
name PairBinder m -> c1 -> c2 -> c3 -> c4
combinator =
String
-> (Bool -> c1 -> c2 -> c3 -> c4)
-> Component c1
-> Component c2
-> Component c3
-> Component c4
forall c1 c2 c3 c4.
String
-> (Bool -> c1 -> c2 -> c3 -> c4)
-> Component c1
-> Component c2
-> Component c3
-> Component c4
Configuration.parallelRouterAndBranches String
name (\Bool
b-> PairBinder m -> c1 -> c2 -> c3 -> c4
combinator (PairBinder m -> c1 -> c2 -> c3 -> c4)
-> PairBinder m -> c1 -> c2 -> c3 -> c4
forall a b. (a -> b) -> a -> b
$ Bool -> PairBinder m
forall (m :: * -> *). MonadParallel m => Bool -> PairBinder m
chooseBinder Bool
b)
chooseBinder :: MonadParallel m => Bool -> PairBinder m
chooseBinder :: forall (m :: * -> *). MonadParallel m => Bool -> PairBinder m
chooseBinder Bool
parallel = if Bool
parallel then (x -> y -> m r) -> m x -> m y -> m r
PairBinder m
forall (m :: * -> *). MonadParallel m => PairBinder m
parallelBinder else (x -> y -> m r) -> m x -> m y -> m r
PairBinder m
forall (m :: * -> *). Monad m => PairBinder m
sequentialBinder
recursiveComponentTree :: MonadParallel m => String -> (PairBinder m -> c1 -> c2 -> c2) -> Component c1 -> Component c2
recursiveComponentTree :: forall (m :: * -> *) c1 c2.
MonadParallel m =>
String
-> (PairBinder m -> c1 -> c2 -> c2) -> Component c1 -> Component c2
recursiveComponentTree String
name PairBinder m -> c1 -> c2 -> c2
combinator = String -> (Bool -> c1 -> c2 -> c2) -> Component c1 -> Component c2
forall c1 c2.
String -> (Bool -> c1 -> c2 -> c2) -> Component c1 -> Component c2
Configuration.recursiveComponentTree String
name (\Bool
b-> PairBinder m -> c1 -> c2 -> c2
combinator (PairBinder m -> c1 -> c2 -> c2) -> PairBinder m -> c1 -> c2 -> c2
forall a b. (a -> b) -> a -> b
$ Bool -> PairBinder m
forall (m :: * -> *). MonadParallel m => Bool -> PairBinder m
chooseBinder Bool
b)