úÎLú@éƒ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ Trustworthy24;BHMVPointers can be linear, nonlinear, or focused. There are the following tradeoffs: ULinear pointers support strong update, but can only be split under focusing. CNonlinear pointers can be split, but do not support strong update. €Placeholders classify pointers that either point to junk or to data that is not allowed to be used (to maintain linearity). FWith the Fix constructor, I can build data structures of linear data. QLinear computations are arrows over linear data, but monads over nonlinear data. $Values representing the real world. #Monadic bind (for nonlinear data). Monadic return This setup is from  5http://cs.ioc.ee/~tarmo/tsem11/jeltsch1602-slides.pdf It implements some of  Nhttp://pauillac.inria.fr/~fpottier/slides/fpottier-2007-05-linear-bestiary.pdf <3Allocate a new linear block (containing junk), Use C to initialize it. =Use BA to take ownership of the contents of a block before freeing it. >4Split a pointer to a pair, into a pair of pointers. @Focusing on a pointer. ŠTemporarily turns a linear pointer into a focused pointer. I get the linear pointer back after all copies have been surrendered (with ). AFocusing on a handle. B7Take the data out of a block, making it a placeholder. CThe reverse operation. D)A placeholder block can change its type. EAllocate a nonlinear pointer. HEDuplicate the world state. This is interpreted as creating a thread. I Sync together two world states. mƒ „ …† ‡ˆ‰Š‹Œ !"#$%&Ž'()*+,-./012345678‘’“9:”;<=>?@ABCDEFGHIJKL•–—˜™š›œžŸ ¡¢M  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM !"#$%& '()*+,-./012345678   9:;<=>?@ABCDEFGHIJKL^ƒ „  …† ‡ˆ‰Š‹Œ !"#$%&Ž'()*+,-./012345678‘’“9:”;<=>?@ABCDEFGHIJKL•–—˜™š›œžŸ ¡¢Safe-HJKMY$Distributivity with monad products. MNOPQRSTUVWXYZ[\]^_`a MNOPQRSTUVWXYMNOa`_^]PQ\R[STUVWXZYMNOPQRSTUVWXYZ[\]^_`aUnsafe2346JKbIAn automatic lifter. The idea of automatic lifting is due to Dan Piponi. bcdefghijbc bcjihgfedbcdefghijSafe368JKm/Transformers that distribute over one another.  For reorganizing a monad stack. pXPop out the underlying monad of a transformer, with a data structure to hold the state. q Put the data structure back in. sThe opposite of takeout. u,Left distributivity of a monad transformer. vRight distributivity. klmnopqrstuvwxyz{|}~€ klmnopqrstuvropq€~}stmnkl|{zyxwuvklmnopqrstuvwxyz{|}~€ Trustworthy;HMAn IO monad transformer. g cannot be unwrapped in the usual way -- the monad inside it has to be unwrapped. This is done using ‚, and £ from mmorph. ÿ Most of the safety of the IO monad is ensured statically. However, to ensure that the same RealWorld token is not used multiple times, a runtime check is necessary. Among the alternatives that perform I/O, the first alternative forced by a concatenation of £Gs will contain a result, and subsequent alternatives will be errors. Therefore, a concatenation of hoistsu out of a monad defines at most one path of RealWorld token use. Here is an example using the binary tree monad: Hlet io :: IOT Tree () = lift (Node (Leaf 1) (Leaf 2)) >>= liftIO . print1run $ hoist (\(Node (Leaf x) _) -> Identity x) io1 1run $ hoist (\(Node _ (Leaf x)) -> Identity x) io2 8run $ hoist (\(Node (Leaf _) (Leaf x)) -> Identity x) io1 )*** Exception: IOT: double RealWorld use ‚+Run an IOT yielding an IO computation. The ¤' monad is a trivial wrapper around IO. ¥¦§¨©ª‚«¬­®¯°±?²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜݤÞßàáâãä壿çèéêëì‚‚ ¥¦§¨©ª‚«¬­®¯°±í         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY$Z[\]^_`abcdefghijklmnopq!rstuvwxyz{|}~€ ‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œž€ŸŸ ¡¢£¤¥¦§¨©ª«¬ª«­ª«®ª«¯ª«°ª±²ª³´ª³µª³¶ª«·ª«¸ª±¹ª³ºª»¼ª³½ª³¾ª³¿ª³Àª³Áª³Âª³Ãª³Äª³Åª³Æª³Çª³Èª³Éª³Êª³Ëª³Ìª³Íª³Îª³Ïª³Ðª³Ñª³Òª³Óª³Ôª³Õª³Öª³×ª³Øª³Ùª³ÚœžœÛ™šÜ™šÝ™šÞ™šß™šà™šá™š♚㙚äœåæœå„œçèœçéêMonadCompose-0.8.3.1Control.LinearControl.Monad.PlusMonadControl.Monad.LifterControl.Monad.DistributiveControl.Monad.IOT Weakening weakening Placeholder NonlinearFocusedLinearPointerFixInOpen Semiclosed ExclusivePairBlankFnASt>>==rtnrunbimapassoc1assoc2drop1drop2undrop1undrop2swapapplycurrydistrassoc3assoc4void'bimap'opengetStdin getStdout getStderrcloseclose1fileSize setFileSizeeofseektellcharline lookaheadcontentsputCputSrandomfixInj1fixInj2 contractionnewfreesplitptrSwapfocusfocusHdlpeek'poke' changeType newNonlinearpeek1poke1forkjoin' helloWorld printStuff concurrent::+PlusunPlusinlinrmapPluscommassoc cancelLeft cancelRightrefl $fMMonad::+ $fMFunctor::+$fMonadTrans::+$fAlternative::+$fMonadPlus::+$fApplicative::+ $fFunctor::+ $fMonad::+Lifterlf $fLiftermm $fLiftermn $fLifterm::+$fLifterIdentityIdentity $fLifterSTST $fLifterIOIO $fLifterSTIO Rightdistrrdist LeftdistrldistTakeouttakeoutcombineputinputin1ldist'rdist'$fRightdistrReaderT$fRightdistrStateT$fRightdistrStateT0$fLeftdistrListT$fLeftdistrWriterT$fLeftdistrErrorT$fTakeoutWriterT(,)$fTakeoutReaderTIdentity$fTakeoutStateT(,)$fTakeoutStateT(,)0IOT Splittable OpenhandlegetHdllift setBinaryalignfrstsecndcoercedummy$fWeakeningOpen$fWeakeningPointer$fWeakeningPointer0$fSplittableFocused$fSplittableNonlinear$fStorablePointer$fStorableHandle$fStorablePair$fStorableBlank$fOpenhandleOpen$fOpenhandleExclusive$fArrowChoiceA$fArrowA $fCategory*A mmorph-1.0.4Control.Monad.Morphhoisttransformers-0.4.3.0Data.Functor.IdentityIdentityStateerr_hoist_squash $fMMonadIOT $fMFunctorIOT$fMonadTransIOT $fMonadIOIOT $fFunctorIOT$fApplicativeIOT $fMonadIOTbaseGHC.Basefail>>=>>fmapreturnControl.Monad.Fixmfix Control.MonadguardliftMjoinMonadFunctorMonadFix MonadPlus Data.FunctionfixmfilterapliftM5liftM4liftM3liftM2unlesswhen replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMvoidforever<=<>=>msumforM_forMfilterMmapM_mapM sequence_sequence=<<mplusmzero runIdentity|>==<|<|<>|>squash generalizeMFunctorembedMMonadControl.Monad.Trans.Class MonadTransControl.Monad.IO.ClassMonadIOliftIO