;B%      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ @(c) Ross Paterson 2012, (c) 2015 KONISHI Yohsuke BSD-style (see the file LICENSE)KONISHI Yohsuke experimentalportableSafe %&'(   0Enable deep level Applicative style programming.(C) 2015 KONISHI Yohsuke 4BSD-style (see the LICENSE file in the distribution)ocean0yohsuke@gmail.com experimental---Safe! Alias for ).  (1+) |> 23"#The auguments-flipped function for !.  1 <| (+2)3 1 <|(+)|> 23 1 <|(+)|> 2 <|(*)|> 39 1 <|(,)|> 2(1,2)# Alias for *.$ Alias for +. (1+) |$> [2][3]%#The auguments-flipped function for $. [1] <$| (+2)[3]("<"++)|$> ["a","b"] <$|(++">") ["<a>","<b>"]& Alias for ,.[(1+)] |*> [2][3][1] <$|(+)|*> [2][3][1] <$|(+)|*> [0,1,2][1,2,3]%[0,1] <$|(+)|*> [2,3] <$|(^)|*> [4,5][16,32,81,243,81,243,256,1024]Efoldr (\x acc -> x <$|(:)|*> acc) ((*:) []) [Just 1, Just 2, Just 3] Just [1,2,3]Efoldr (\x acc -> x <$|(:)|*> acc) ((*:) []) [Just 1, Nothing, Just 3]Nothing(filter (even <$|(&&)|*> (10 >)) [1..100] [2,4,6,8]9filter (even <$|(&&)|*> (10 >) <$|(&&)|*> (5 <)) [1..100][6,8]'#The auguments-flipped function for &. (Combination consisted of ket & and cover # , defined as f |* x = f |*> (*:) x. [(1+)] |* 2[3][1] <$|(+)|* 2[3][1] <$|(+)|* 2 <$|(*)|* 3[9]Just 1 <$|(,)|* 2 Just (1,2))#The auguments-flipped function for (.  1 *| [(+2)][3]1 *| [(+)] |* 2[3]1 *|[(+),(-),(*),(^)]|* 2 [3,-1,2,1]1 *|Just (,)|* 2 Just (1,2)*Combination consisted of cover # twice, defined as (**:) = (*:) . (*:).+Combination consisted of cover # and ket $ , defined as (-*) = ((*:)|$>)., Alias for #. -Combination consisted of cover $ twice, defined as (|$>>) = (|$>) . (|$>).(+1) |$>> [[2]][[3]].#The auguments-flipped function for -[[2]] <<$| (+1)[[3]]/The lifted function of & , defined as (|*>>) = liftA2 (|*>).[Just 1] <<$|(+)|*>> [Just 2][Just 3][Just 1] <<$|(,)|*>> [Just 2] [Just (1,2)])[[1]] <<$|(+)|*>> [[2]] <<$|(-)|*>> [[3]][[0]]wfoldr (\n acc -> n <<$|(+)|*>> acc) ((**:) 0) [Right (Just 1), Right (Just 2), Right (Just 3)] :: Either () (Maybe Int)Right (Just 6)vfoldr (\n acc -> n <<$|(+)|*>> acc) ((**:) 0) [Right (Just 1), Right Nothing, Right (Just 3)] :: Either () (Maybe Int) Right NothingVfoldr (\n acc -> n <<$|(+)|*>> acc) ((**:) 0) [Right (Just 1), Right Nothing, Left ()]Left ()0The lifted function of ' , defined as (<<*|) = liftA2 (<*|).1Combination consisted of ket / and cover * , defined as f |** x = f |*>> (**:) x.[Just 1] <<$|(+)|** 2[Just 3]2#The auguments-flipped function for 1.1 **|(+)|$>> [Just 2][Just 3]1 **|[Just (+)]|** 2[Just 3]11 **|[Just (+), Just (-), Just (*), Nothing]|** 2![Just 3,Just (-1),Just 2,Nothing]3Combination consisted of ket / and cover + , defined as f |-* x = f |*>> (-*) x.[Just 1] <<$|(+)|-* [2][Just 3]4Combination consisted of ket / and cover , , defined as f |*- x = f |*>> (*-) x.[Just 1] <<$|(+)|*- Just 2[Just 3]5#The auguments-flipped function for 3.[1] -*|(+)|$>> [Just 2][Just 3]6#The auguments-flipped function for 4.Just 1 *-|(+)|$>> [Just 2][Just 3]Just 1 *-|[Just (+)]|** 2[Just 3]Just 1 *-|[Just (+)]|*- Just 2[Just 3][1] -*|[Just (+)]|*- Just 2[Just 3]8[1] -*|[Just (+), Just (-), Just (*), Nothing]|*- Just 2![Just 3,Just (-1),Just 2,Nothing]:[0,1] -*|[Just (+), Just (-), Just (*), Nothing]|*- Just 2A[Just 2,Just 3,Just (-2),Just (-1),Just 0,Just 2,Nothing,Nothing](print 1 -*|return [\_ _ -> 3]|-* print 212[3]7The lifted function of - , defined as  liftA2 (*>).%sequence $ Just (print 1) *>> (**:) 21Just 2"(-*) (print 1) *>> return (Just 2)1Just 28The lifted function of . , defined as  liftA2 (<*).%sequence $ (**:) 2 <<* Just (print 1)1Just 28sequence $ Just (print 1) *>> (**:) 3 <<* Just (print 2)12Just 3Lsequence $ [putStr "1", putStr "2"] *>> (**:) 0 <<* [putStr "3", putStr "4"]13142324[0,0,0,0]9"Combination consisted of sequence 7 and cover +.print 1 -*> (*:) (Just 2)1Just 2:"Combination consisted of sequence 8 and cover +.(*:) (Just 2) <-* print 11Just 2%print 1 -*> (*:) (Just 3) <-* print 212Just 3%print 1 -*> (*:) (Just 3) <*- Nothing1Nothing;"Combination consisted of sequence 7 and cover #.$sequence $ print 1 *-> Just ((*:) 2)1Just 2<"Combination consisted of sequence 8 and cover #.$sequence $ Just ((*:) 2) <*- print 11Just 20sequence $ print 1 *-> Just ((*:) 3) <*- print 212Just 30sequence $ print 1 *-> Just ((*:) 3) <-* NothingNothingQ!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqn,*/0123456789:;<+=>?@A.-BCDEF!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqQ!"#$%&'()*,+-./0123456789:;<=@?>ABCDEFGHIJKLMONPQRSUTVWXYZ[\]^_`abcdefghijklmnopqQ!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqQ!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq$Enable deep level Monad programming.(C) 2015 KONISHI Yohsuke 4BSD-style (see the LICENSE file in the distribution)ocean0yohsuke@gmail.com experimental---SafevThe v5 class defines the Monad functions for level-3 types  m1 (m2 (m3 a).:{  -- IO-List-List Monad [["a","b"]] ->>== \x -> [[0],[1,2]] ->>== \y -> print (x,y) >--~ (***:) (x ++ show y):}("a",0)("a",1)("a",2)("b",0)("b",1)("b",2)E[["a0","b0"],["a0","b1","b2"],["a1","a2","b0"],["a1","a2","b1","b2"]]xThe x5 class defines the Monad functions for level-2 types  m1 (m2 a)G; such as [[a]], Maybe [a], Either () (Maybe a), a -> [b], IO [a], etc.:{ -- List-List Monad [["a","b"]] >>== \x ->  [[0],[1,2]] >>== \y ->  (**:) (x ++ show y):}E[["a0","b0"],["a0","b1","b2"],["a1","a2","b0"],["a1","a2","b1","b2"]]:{ @ let lengthM :: [Int] -> Maybe Int -- ((->) [Int])-Maybe Monad lengthM [] = Nothing# lengthM xs = Just (length xs) & averageM :: [Int] -> Maybe Double averageM = I sum >-== \s -> -- sum :: [Int] -> Int -- ((->) [Int]) Monad lengthM >>== \l ->0 (**:) (fromIntegral s / fromIntegral l)( in [averageM [10, 25, 70], averageM []]:}[Just 35.0,Nothing]yBind function of level-2.z Alias for ). Just -< 3Just 3{#The auguments-flipped function for z. 3 >- JustJust 3:{let plus :: Int -> Int -> Int plus x y =  x >- \a -> y >- \b -> a + b in plus 3 4:}7| Alias for G. ((3+) <-< (2*) <-< (1+)) -< 17}#The auguments-flipped function for |. 1 >- ((+1) >-> (*2) >-> (+3))7~#The auguments-flipped function for H. Composite function of level-2.Sequence function of level-2.!Bind-cover function made of bind y and cover + , defined as m >-== k = (-*) m >>== k.!Bind-cover function made of bind y and cover , , defined as m >-== k = (*-) m >>== k.)Sequence-cover function made of sequence  and cover + , defined as m >-~ k = (-*) m >>~ k.)Sequence-cover function made of sequence  and cover , , defined as m >-~ k = (*-) m >>~ k.1rstuvwxyz{|}~IJKLMNOPQRSTOUVHWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}rstuvwxyz{|}~%z{}|~xyvwturs-rstuvwxyz{|}~IJKLMNOPQRST!suwyz{|}~Commutative Functor.MConor McBride and Ross Paterson 2005, (C) 2015 KONISHI Yohsuke 4BSD-style (see the LICENSE file in the distribution)ocean0yohsuke@gmail.com experimental---SafeThis method is equivalent for   just except the name. The only difference is the name "commute", that is to say from which no action kind of concepts smell.Do fmap f then commute, equivalent for  .#The auguments-flipped function for , equivalent for  .)This function may be used as a value for W in a \ instance, provided that  is defined. (Using  with a - instance will result in infinite recursion.))This function may be used as a value for  in a ~ instance.*Extension for mmorph's Contrl.Monad.Morph.>2013 Gabriel Gonzalez, (C) 2015 KONISHI Yohsuke 4BSD-style (see the LICENSE file in the distribution)ocean0yohsuke@gmail.com experimental---Safe357IN Alias for ./Equivalent to (|>|) with the arguments flipped.  .Enable deep level Monad-Transform programming.(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001, (C) 2015 KONISHI Yohsuke BSD-style (see the file LICENSE)ocean0yohsuke@gmail.com experimental---Safe 3457>LFollowing property holds. untransfold3 . transfold3 == idFollowing property holds. untransfold2 . transfold2 == idRequired only for  and  722$ (Extension for mtl's Contrl.Monad.Except.?(C) 2013 Ross Paterson, (C) 2015 KONISHI Yohsuke  BSD-style (see the file LICENSE)ocean0yohsuke@gmail.com experimental---Safe35IN EUVHWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} %Extension for mtl's Contrl.Monad.RWS.(C) 2015 KONISHI Yohsuke, (c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001 BSD-style (see the file LICENSE)ocean0yohsuke@gmail.com experimental---Safe-357>L,UVHWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}   ( (Extension for mtl's Contrl.Monad.Reader.(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology 2001, (c) Jeff Newbern 2003-2007, (c) Andriy Palamarchuk 2007, (C) 2015 KONISHI Yohsuke, BSD-style (see the file LICENSE)ocean0yohsuke@gmail.com experimental---Safe -357>ILN      IUVHWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}       'Extension for mtl's Contrl.Monad.State.(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001, (C) 2015 KONISHI Yohsuke, BSD-style (see the file LICENSE)ocean0yohsuke@gmail.com experimental---Safe-357>L*      !"#$%&'()*+,-./01YUVHWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} 23456789:;<=>          &      !"#$%&'()*+,-./01 (Extension for mtl's Contrl.Monad.Writer.(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001, (C) 2015 KONISHI Yohsuke, BSD-style (see the file LICENSE)ocean0yohsuke@gmail.com experimental---Safe35 ?@ABCeUVHWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} DEFGHIJKL ?@ABC $Enable deep level Arrow programming.?(c) Ross Paterson 2002, (C) 2015 KONISHI Yohsuke 4BSD-style (see the LICENSE file in the distribution)ocean0yohsuke@gmail.com experimental---Safe !"#$MNOPQRST,UVWXYZ[\]^_`abcdefghijklmnopqrst !"#$ "#$ !  !"#$MNOPQRSTu ! " # $%&%'%(%)%*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                               ! "  # $ % & ' ( ) ) * + + , - - . / / 0121314156786796:;67<67=67>67?6@A6@B6@C6@C6@D6@E6@F6@G6@H6@I6@J6@K6@K67L67M67N67O67P67Q67R67S67T67U67V67WXYZ[\]^_`abc67d67e67f67g6hi67j67k67l6hm6hn6ho6hp6hq6hr6hs6ht6hu6hv6hw6hx6hy6hz6 {6 |6 }6~6666:67676767676767676767676666666666666666666666666666666667676767   %%                       ! ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >?@?@?A?B?C?D?E?F?G?H?I?J?K L M N O PQRQRQSQTQUQVQWQXQY Z [ \ ] ^ _ ` a6bc6bd6be6bf6bg6bh6bi6bj6bk6bl6bm6bn6bo6bp6bq6br6bs6bs6bt6bu6bv6bw6bx6by6bz6b{6b|6b}6b}6b~66deepc_4kRZI1CfTMq7fkPAyZx84MDeepControl.Monad.TransDeepControl.Monad.Trans.RWSDeepControl.Monad.SignaturesDeepControl.ApplicativeDeepControl.MonadDeepControl.CommutativeDeepControl.Monad.MorphDeepControl.Monad.Trans.ExceptDeepControl.Monad.Trans.ReaderDeepControl.Monad.Trans.StateDeepControl.Monad.Trans.WriterDeepControl.ArrowData.Traversable sequenceAtraversefor Data.FoldablefoldMaptrans_3eG64VdP2vzGjP6wJiCp5XControl.Monad.Trans.Class MonadTransliftControl.Monad.IO.ClassMonadIOliftIOmtl_KMpng31YRYc5JfMWFZ3FCUControl.Monad.Reader.Classreaderlocalask MonadReaderControl.Monad.State.Classstateputget MonadStateControl.Monad.Writer.Classpasslistentellwriter MonadWriterPass5Listen5Catch5CallCC5Pass4Listen4Catch4CallCC4Pass3Listen3Catch3CallCC3Pass2Listen2Catch2CallCC2|><|*:|$><$||*><*||**|**:-**-|$>><<$||*>><<*||****||-*|*--*|*-|*>><<*-*><-**-><*-***:-***-***---*-*-*--|$>>><<<$||*>>><<<*||******||-**|*-*|**-|--*|*--|-*--**|*-*|**-|--*|*--|-*-|*>>><<<**-->-*->--*>**->*-*>-**><*--<-*-<--*<**-<*-*<-******:|$>>>><<<<$||*>>>><<<<*|*>>>><<<<******:|$>>>>><<<<<$||*>>>>><<<<<*|*>>>>><<<<<*Monad5>>>>>==Monad4>>>>==Monad3>>>==Monad2>>==-<>-<-<>-><<>==>>>~>-==->==>-~->~>===>>>>~>--==->-==-->==>>-==->>==>->==>--~->-~-->~>>-~->>~>->~>====>>>>>~>=====>>>>>>~ Commutativecommutecmapcfor fmapDefaultfoldMapDefaultsink2float2sink3float3sink4float4sink5float5|>||<||>>||<<||>>>||<<<||>>>>||<<<<||>>>>>||<<<<<| MonadTrans5lift5 MonadTrans4lift4MonadTransCover3|--*||-*-||*--|MonadTransFold3 transfold3 untransfold3T__M__MonadTrans3Down Trans3Down MonadTrans3lift3MonadTransCover2|-*||*-|MonadTransFold2 transfold2 untransfold2T_M_MonadTrans2Down Trans2Down MonadTrans2lift2 MonadTrans_transuntransMonadTransCover|*|MMonadTransDown TransDown|**|trans2untrans2|***||-**||*-*||**-|trans3untrans3 throwError2 catchError2 throwError3 catchError3 throwError4 catchError4 throwError5 catchError5RWST3runRWST3RWST2runRWST2rwsT2 evalRWST2 execRWST2mapRWST2 withRWST2 liftCatch2rwsT3 evalRWST3 execRWST3mapRWST3 withRWST3 liftCatch3ReaderT3 runReaderT3ReaderT2 runReaderT2 mapReaderT2 mapReaderT3StateT3 runStateT3StateT2 runStateT2 evalStateT2 execStateT2 mapStateT2 withStateT2 liftListen2 liftPass2 evalStateT3 execStateT3 mapStateT3 withStateT3 liftListen3 liftPass3listen2pass2listen3pass3Kleisli5 runKleisli5Kleisli4 runKleisli4Kleisli3 runKleisli3Kleisli2 runKleisli2Control.Monad.SignaturesCallCCCatchListenPassbaseGHC.Base$pure Data.Functor<$><*>*><* ApplicativeControl.ApplicativeoptionalgetConstConst unwrapMonad WrapMonad WrappedMonad unwrapArrow WrapArrow WrappedArrow getZipListZipListliftA3liftA2liftA<**><$manysome<|>empty Alternative.>>$fMonad5Either $fMonad5[] $fMonad5Maybe$fMonad4Either $fMonad4[] $fMonad4Maybe$fMonad3Either $fMonad3[] $fMonad3Maybe$fMonad2Either $fMonad2[] $fMonad2Maybefail>>=fmapreturn Control.MonadguardjoinMonadFunctormfilter<$!>unless replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterMforMsequencemapMmsum sequence_forM_mapM_voidapliftM5liftM4liftM3liftM2liftMwhen=<<mplusmzero MonadPlusFoldableIdgetId$fApplicativeId $fFunctorId$fCommutativeEither$fCommutative[]$fCommutativeMaybemmorp_8dNpUU8QFPe77rrwKAb20bControl.Monad.Morphhoist|>==<|<|<>|>squash generalizeMFunctorembedMMonad$fMonadTrans_ExceptT$fMonadTrans_MaybeT$fMonadTrans_ListT$fMonadTransCoverExceptT$fMonadTransCoverMaybeT$fMonadTransCoverListT$fMonadTransDownExceptT$fMonadTransDownMaybeT$fMonadTransDownListT$fMonad5ExceptT$fMonad4ExceptT$fMonad3ExceptT$fMonad2ExceptT$fCommutativeExceptTControl.Monad.FixmfixMonadFix Data.FunctionfixControl.Monad.Error.Class catchError throwError MonadErrorControl.Monad.Trans.ExceptExceptTExcept runExcept mapExcept withExcept runExceptT mapExceptT withExceptT$fAlternativeRWST3$fMonadPlusRWST3$fMonadTransCover3RWST3$fMonadTransFold3RWST3$fMonadTrans3DownRWST3$fMonadIORWST3$fMonadTrans3RWST3$fMonadStatesRWST3$fMonadWriterwRWST3$fMonadReaderrRWST3 $fMonadRWST3$fApplicativeRWST3$fAlternativeRWST2$fMonadPlusRWST2$fMonadTransCover2RWST2$fMonadTransFold2RWST2$fMonadTrans2DownRWST2$fMonadIORWST2$fMonadTrans2RWST2$fMonadStatesRWST2$fMonadWriterwRWST2$fMonadReaderrRWST2 $fMonadRWST2$fApplicativeRWST2$fMonadTransCoverRWST$fMonadTransDownRWST Data.Monoid<>getDualDualappEndoEndogetAllAllgetAnyAnygetSumSum getProductProductgetFirstFirstgetLastLastgetAltAltmconcatmappendmemptyMonoidControl.Monad.RWS.ClassMonadRWSasksgetsmodify'modifycensorlistensControl.Monad.Trans.RWS.LazyRWSTrunRWSTRWSrwsrunRWSevalRWSexecRWSmapRWSwithRWSevalRWSTexecRWSTmapRWSTwithRWST$fAlternativeReaderT3$fMonadPlusReaderT3$fMonadTransCover3ReaderT3$fMonadTransFold3ReaderT3$fMonadTrans3DownReaderT3$fMonadIOReaderT3$fMonadTrans3ReaderT3$fMonadReaderrReaderT3$fMonadReaderT3$fApplicativeReaderT3$fMonadPlusReaderT2$fAlternativeReaderT2$fMonadTransCover2ReaderT2$fMonadTransFold2ReaderT2$fMonadTrans2DownReaderT2$fMonadIOReaderT2$fMonadTrans2ReaderT2$fMonadReaderrReaderT2$fMonadReaderT2$fApplicativeReaderT2$fMonadTransCoverReaderT$fMonadTransDownReaderTControl.Monad.Trans.ReaderReaderT runReaderTReader runReader mapReader withReader mapReaderT withReaderT$fAlternativeStateT3$fMonadPlusStateT3$fMonadTransCover3StateT3$fMonadTransFold3StateT3$fMonadTrans3DownStateT3$fMonadIOStateT3$fMonadTrans3StateT3$fMonadStatesStateT3$fMonadStateT3$fApplicativeStateT3$fAlternativeStateT2$fMonadPlusStateT2$fMonadTransCover2StateT2$fMonadTransFold2StateT2$fMonadTrans2DownStateT2$fMonadIOStateT2$fMonadTrans2StateT2$fMonadStatesStateT2$fMonadStateT2$fApplicativeStateT2$fMonadTransCoverStateT$fMonadTransDownStateTControl.Monad.Trans.State.LazyStateT runStateTStaterunState evalState execStatemapState withState evalStateT execStateT mapStateT withStateT$fMonad5WriterT$fMonad4WriterT$fMonad3WriterT$fMonad2WriterT$fCommutativeWriterTControl.Monad.Trans.Writer.LazyWriterT runWriterTWriter runWriter execWriter mapWriter execWriterT mapWriterT$fArrowKleisli5$fCategory*Kleisli5$fArrowKleisli4$fCategory*Kleisli4$fArrowKleisli3$fCategory*Kleisli3$fArrowKleisli2$fCategory*Kleisli2 Control.Arrowarrfirstapp|||loopleftApp^<<<<^>>^^>>returnA&&&***secondArrow runKleisliKleisli zeroArrow ArrowZero<+> ArrowPlus+++rightleft ArrowChoice ArrowApply ArrowMonad ArrowLoopControl.Category>>><<<