- ) N      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG H I J K L M Safe*(c) 2012 Ian-Woo KimBSD3!Ian-Woo Kim <ianwookim@gmail.com> experimentalGHCSafeevent or action action order     (c) 2012-2016 Ian-Woo KimBSD3!Ian-Woo Kim <ianwookim@gmail.com> experimentalGHCSafe*357 )type for coroutine status after execution Coroutine type is regarded as a Client type which can be paired with Server type with opposite request and answer type.  Server type )general symmetric bidirectional coroutine2command functor of general bidirectional coroutineaConsumer type is a single-sided coroutine which only gets an input without producing output. ,await command functor for consumer coroutineeGenerator type is single-sided coroutine which only gives an output without getting any request. yield command functor-primitive coroutine action yielding an output,primitive coroutine action awaiting an inputprimitive request coroutine +connecting server and client in error monadcombine state and free monad with base state monad transformer with a base monad m to free monad with the base monad m Think this as fusing down the state monad  server coroutineclient coroutine    (c) 2012 Ian-Woo KimBSD3!Ian-Woo Kim <ianwookim@gmail.com> experimentalGHCSafe!"IN )convenient error state monad for object !Server object base coroutine" Client object# Server object$/output of methdo of an object with signature s '.input of method of an object with signature s !"#$%&'() !"#$%&'() '($%&#"! ) !"#$%&'()(c) 2012 Ian-Woo KimBSD3!Ian-Woo Kim <ianwookim@gmail.com> experimentalGHCNone!"35 *+,-./0123*+,-./01 /032-.,+*1*+,-./0123(c) 2012 Ian-Woo KimBSD3!Ian-Woo Kim <ianwookim@gmail.com> experimentalGHCNone!">N456789:;456789:;567849:;456789:;None!"35N<driver client =driver >signature of IO event driverA basic driver Bsingle event dispatch C1a single feedback step of multiple event dispatchD*full multiple event dispatch with feedbackEconvenience routine for driver <=>?@ABCDE <=>?@ABCDE >?=<@ABCDE <=>?@ABCDE(c) 2012 Ian-Woo KimBSD3!Ian-Woo Kim <ianwookim@gmail.com> experimentalGHCNoneFFFF Safe!"NH first is GHIJKGHIJKHIGJKGHIJK None!"NLMLMLMLMN     !"#$%&'()**+,,-./0123456789:;<=>?@ABCDEFGHIJ K L M N O P QRcorou_034DzQJFMLmDEi9nLQeSQmControl.Monad.Trans.Crtn.QueueControl.Monad.Trans.Crtn.EventControl.Monad.Trans.CrtnControl.Monad.Trans.Crtn.ObjectControl.Monad.Trans.Crtn.LoggerControl.Monad.Trans.Crtn.WorldControl.Monad.Trans.Crtn.Driver%Control.Monad.Trans.Crtn.EventHandler Control.Monad.Trans.Crtn.IOActor&Control.Monad.Trans.Crtn.Logger.SimpleQueuefqueuebqueue emptyQueueenqueuedequeueEvOrAct ActionOrderCrtnErrServerFinishedOtherCliTSrvTCrtnTRqstCnsmTAwtGenTYldyieldawaitrequest<==| mapStateDown $fFunctorRqst $fFunctorAwt $fFunctorYldEStTSObjBTCObjTSObjTResIgnArgquery LogClient LogServerLogInputLogOpWriteLogMonadLogscribewriteLog $fMonadLogIO $fMonadLogtWorldWorldOp GiveEventFlushLog FlushQueue giveEventflushLog flushQueue DrvClientDriverDrvOpDispatchdispatchdriversingleDispatch multiDispatchmultiDispatchTillEndfire eventHandlerIOActorIOOp DoIOAction doIOAction ioactorgen simpleloggerloggerW