úÎ+ë*]BDescription of concurrent computation with sequential components. (c) Alexander Vieth, 2015BSD3aovieth@gmail.com experimentalnon-portable (GHC only)None !"+,-BHM bConcurrential without a Monad instance, but an Applicative instance which exploits concurrency.SDescription of computation which is composed of sequential and concurrent parts.UDescription of the way in which a monadic term's evaluation should be carried out. UOur own Identity functor, so that we don't have to depend upon some other package. ;An Async without a type parameter, which can be waited for. !Wait for a SomeAsync to complete. cRun a Concurrential term with a continuation. We choose CPS here because it allows us to explot  withAsync\, giving us a guarantee that an exception in a spawning thread will kill spawned threads.TRun a Concurrential term, realizing the effects of the IO terms which compose it.9Create an effect which must be run sequentially. If a sequentially io appears in a Concurrential t‡ term then it will always be run to completion before any later sequential part of the term is run. Consider the following terms: Õ a = someConcurrential *> sequentially io *> someOtherConcurrential b = someConcurrential *> concurrently io *> someOtherConcurrential c = someConcurrential *> sequentially io *> concurrently otherIo When running the term a, we are guaranteed that io/ is completed before any sequential part of someOtherConcurrential( is begun, but when running the term b, this is not the case; io: may be interleaved with or even run after any part of someOtherConcurrential . The term c# highlights an important point: concurrently otherIo' may be run before, during or after sequentially io\! The ordering through applicative combinators is guaranteed only among sequential terms.…Create an effect which is run concurrently where possible, i.e. whenever it combined applicatively with other terms. For instance: \ a = concurrently io *> someConcurrential b = concurrently io >> someConcurrential When running the term a, the IO term io" will be run concurrently with someConcurrential, but not so in b/, because monadic composition has been used.‚Inject a ConcurrentialAp into Concurrential, losing the concurrency-enabling Applicative instance but gaining a Monad instance.    The computation to run.The sequential part.<The continuation; fst is sequential part, snd is value part.WSimilar contract to withAsync; the Async argument is useless outside of this function.           Concurrential-0.5.0.1 Control.Concurrent.Concurrential async-2.0.2Control.Concurrent.AsyncwaitConcurrentialAp ConcurrentialrunConcurrential sequentially concurrentlyconcurrentiallyChoiceIdentity SomeAsync waitSomeAsyncrunConcurrentialKunConcurrentialApSCApSCBindSCAtom Concurrent Sequential runIdentity$fApplicativeConcurrentialAp$fFunctorConcurrentialAp$fMonadConcurrential$fApplicativeConcurrential$fFunctorConcurrential$fFunctorChoice$fMonadIdentity$fApplicativeIdentity