úÎ+$“7      !"#$%&'()*+,-./0123456789:;(A mutable variable in the IOState monad <The IOState monad =>?@ABThe * function creates a new mutable variable. The 8 function reads the value stored in a mutable variable. The 3 function overwrites the value stored in an IORef. The 5 function applies a function to the value stored in  and IORef. CDThe ( function executes a computation in the  monad. EFGHIJK  LM!"  !"#  ! #"  !";NOPQRSTUVWXYZ[\]^_`$=A scheduler consists of a function that, given the number of  threads, returns the ( of the next scheduled thread,  together with a new scheduler. %&An & is a shared, mutable variable. a'bcdefgh(i)The ) function creates a new & that is initially empty. *The *) function removes the value stored in an  & . If the &" is empty, the thread is blocked. +The + function fills an & with a new value. If the  && is not empty, the thread is blocked. ,The ," function forks off a new thread. j-The -@ function runs a concurrent computation with a given scheduler. , If a deadlock occurs, Nothing is returned. klmnopq.Given a stream of integers, . builds a @ scheduler. This is especially useful if you use QuickCheck and ? generate a random stream; the resulting random scheduler will 2 hopefully cover a large number of interleavings. / A simple round-robin scheduler. rstuvwxyz{| $%&'()*+,-./ '-(&)*+,$%./ $%%&'()*+,-./ 0>The result of running a teletype interation is a (potentially C infinite) list of characters, that are printed to the screen. The ? interaction can also end, and return a final value, using the  1 constructor. 123The IOTeletype monad }~4,Once you have constructed something of type 3 you @ can run the interaction. If you pass in a stream of characters : entered at the teletype, it will produce a value of type 0 5BThe getChar function can be used to read input from the teletype. 6;The getChar function can be used to print to the teletype. 01234563021456021123456$%&'()*+,-./0123456€      !"#$%&'()**+,-./0123456789:;<==>?@ABCDEFGHIJKLMNOPQRSTUVW==>?XYZ[<\]^+@_`abDE-cHdefghijIJKklmnoNFpqrs IOSpec-0.1Test.IOSpec.IORef Data.StreamTest.IOSpec.ConcurrentTest.IOSpec.Teletype Test.IOSpecIORefIOStatenewIORef readIORef writeIORef modifyIORef runIOStateStreamConsheadtail intersperseunfolditeratetakedrop takeWhile dropWhilerepeatcyclefilter!!zipunzipzipWithspanbreakwordsunwordslinesunlines isPrefixOf partitionsplitAt streamToList listToStream SchedulerMVarIOConcThreadId newEmptyMVartakeMVarputMVarforkIO runIOConc streamSched roundRobinOutputFinishPrint IOTeletyperunTTgetCharputCharHeapStorefreshheapReturn WriteIORef ReadIORefNewIORefLocDataunsafeFromDynamic emptyStorestepalloc lookupHeap extendHeap modifyHeap modifyFreshupdateinitstailsProcessAuxMainStatusBlockedStepStopnextTidsoup schedulerblockedThreads ThreadStatusFinishedRunningForkPutMVarTakeMVar NewEmptyMVar initStore emptyMVarfillMVar extendSoup interleaveschedulegetNextThreadId freshThreadId finishThreadresetBlockedThreadsrecordBlockedThreaddetectDeadlock isFinishedReturnTeletypePutCharGetChar