LDOR      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQNone  RSTU     RSTUNoneV WXYZ[\]^_`abcdeV WXYZ[\]^_`abcdV WXYZ[\]^_`abcdeNone fBThis procedure creates a new worker on the current thread (with a D new session ID) and plugs it into the work-stealing environment. D This new worker extracts itself from the work stealing pool when  userComp6 has completed, thus freeing the current thread (this " procedure) to return normally. creates a new IVar read the value in a IVar. The  can only return when the / value has been written by a prior or parallel put to the same  IVar. gBNOTE unsafePeek is NOT exposed directly through this module. (So C this module remains SAFE in the Safe Haskell sense.) It can only 4 be accessed by importing Control.Monad.Par.Unsafe. put_ is a version of put/ that is head-strict rather than fully-strict. Q In this scheduler, puts immediately execute woken work in the current thread. hDNOTE unsafeTryPut is NOT exposed directly through this module. (So C this module remains SAFE in the Safe Haskell sense.) It can only 4 be accessed by importing Control.Monad.Par.Unsafe. i2When an IVar is filled in, continuations wake up. j=Attempt to steal work or, failing that, give up and go idle. :The current policy is to do a burst of of N tries without " yielding or pausing inbetween. k-The continuation which should not be called. l#Arguments flipped for convenience. m;This tries to localize the blocked-indefinitely exception: nBFor debugging purposes. This can help us figure out (but an ugly = process of elimination) which MVar reads are leading to a Thread blocked indefinitely exception. ?Fork a thread but ALSO set up an error handler that suppresses  MVar exceptions. o2Exceptions that walk up the fork tree of threads: ;pqrstuvwxyz{|}~fg hi!jk"#$%&'(lmno  !"#$%&'(  !$#%&'("7pqrstuvwxyz{|}~fg hi!jk"#$%&'(lmnoNone@The main scheduler loop. BProcess the next item on the work queue or, failing that, go into  work-stealing mode. =Attempt to steal work or, failing that, give up and go idle. ;If any worker is idle, wake one up and give it work to do. C"A version that avoids an internal  for calling $ contexts that are already in the  monad. DAAn asynchronous version in which the main thread of control in a C Par computation can return while forked computations still run in  the background. Ecreates a new IVar Fcreates a new IVar that contains a value Gcreates a new IVar* that contains a value (head-strict only) Hread the value in a IVar. The H can only return when the / value has been written by a prior or parallel put to the same  IVar. Ilike J1, but only head-strict rather than fully-strict. Jput a value into a IVar . Multiple Js to the same IVar 1 are not allowed, and result in a runtime error. J: fully evaluates its argument, which therefore must be an  instance of ,. The idea is that this forces the work to D happen when we expect it, rather than being passed to the consumer  of the IVar2 and performed later, which often results in less  parallelism than expected. 6Sometimes partial strictness is more appropriate: see I. K@Allows other parallel computations to progress. (should not be  necessary in most cases). HEquality for IVars is physical equality, as with other reference types. ,)*+,-./0123456789:;<=>?@ABCDEFGHIJK#)*+,-./0123456789:;<=>?@ABCDEFGHIJK#8?>=<;:9234567/01-.),+*@BCDEFGHIJAK),+*-./012345678?>=<;:9@ABCDEFGHIJKNoneLMNO-/BCEFGHIJLMNO/BCL-EFGHJIMNOLMNONoneP9A wrapper around an underlying Par type which allows IO. Q?A run method which allows actual IO to occur on top of the Par @ monad. Of course this means that all the normal problems of B parallel IO computations are present, including nondeterminsm. A simple example program: 0 runParIO (liftIO $ putStrLn "hi" :: ParIO ()) PQ-PQP-QPQNone-/BCEFGHIJLMNO/BCL-EFGHJIMNO        !!"#$%&'() !!  *+,- ./0123"4#('$)5%6"789:;<<=> ?@ABCDEFGHIJKLMNOPQR>STUVWXYZ[\]^_`abcdefghi78jklmnM`opqrstuvm7:8kl6wxyzxy{xy|xy}xy~xyxymonad-par-0.3.4.5Control.Monad.ParControl.Monad.Par.Scheds.SparksControl.Monad.Par.Scheds.Direct&Control.Monad.Par.Scheds.TraceInternalControl.Monad.Par.Scheds.TraceControl.Monad.Par.IO'Control.Monad.Par.Scheds.DirectInternaldeepseq-1.3.0.1Control.DeepSeqNFDataFutureParDonerunParspawn_spawnspawnPgetSchednoworkpoolrngisMainsessionsidleschedsactiveSessionssessionCounter IVarContentsBlockedEmptyFullIVarrunParIOnewput_forkspawn1_newFull_newFullputrunContTraceLiftIOYieldForkNewPutGetschedpollIVar runParAsyncyieldParIO$fApplicativePar $fFunctorPar$fParFutureFuturePar $fMonadParHotVarSession SessionIDROnlyunPar newHotVar modifyHotVar modifyHotVar_ readHotVar writeHotVarhotVarTransaction readHotVarRawwriteHotVarRaw $fShowIORefrunNewSessionAndWait unsafePeek unsafeTryPutwakeUpstealerrK runReaderWith dbgTakeMVarforkIO_SuppressforkWithExceptionsdbgdbglvl_PARPUTS _FORKPARENT _IDLING_ON_WAIT_FOR_WORKERS unsafeParIOioglobalWorkerPool amINestedregisterWorkerunregisterWorkerpopWorkpushWork tryWakeIdlerand makeScheds baseSessionID longjmpSched rescheduleR trivialCont sanityCheck readSessions$fParUnsafeIVarPar$fParIVarIVarPar$fParFutureIVarPar $fNFDataIVar reschedulebaseGHC.IOunsafePerformIOghc-prim GHC.TypesIO$fEqIVarrunPar_internal$fMonadIOParIOmonad-par-extras-0.3.3Control.Monad.Par.CombinatorparForparMapReduceRangeparMapReduceRangeThreshparMapMparMapInclusiveRange