ՠh      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g @(c) Ross Paterson 2012, (c) 2015 KONISHI Yohsuke BSD-style (see the file LICENSE)KONISHI Yohsuke experimentalportableSafe hijk   0Enable deep level Applicative style programming.(C) 2015 KONISHI Yohsuke 4BSD-style (see the LICENSE file in the distribution)ocean0yohsuke@gmail.com experimentalportableSafe! Alias for l.  (1+) |> 23"#The auguments-flipped function for !.  1 <| (+2)3 1 <|(+)|> 23 1 <|(+)|> 2 <|(*)|> 39 1 <|(,)|> 2(1,2)# Alias for m.$ Alias for n. (1+) |$> [2][3]%#The auguments-flipped function for $. [1] <$| (+2)[3]("<"++)|$> ["a","b"] <$|(++">") ["<a>","<b>"]& Alias for o.[(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 (-*) = ((*:)|$>).,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 ()/The lifted function of ' , defined as (<<*|) = liftA2 (<*|).0Combination consisted of ket . and cover * , defined as f |** x = f |*>> (**:) x.[Just 1] <<$|(+)|** 2[Just 3]1#The auguments-flipped function for 0.1 **|(+)|$>> [Just 2][Just 3]1 **|[Just (+)]|** 2[Just 3]11 **|[Just (+), Just (-), Just (*), Nothing]|** 2![Just 3,Just (-1),Just 2,Nothing]2Combination consisted of ket . and cover + , defined as f |-* x = f |*>> (-*) x.[Just 1] <<$|(+)|-* [2][Just 3]3Combination consisted of ket . and cover *- , defined as f |*- x = f |*>> (*-) x.[Just 1] <<$|(+)|*- Just 2[Just 3]4#The auguments-flipped function for 2.[1] -*|(+)|$>> [Just 2][Just 3]5#The auguments-flipped function for 3.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]6The lifted function of p , defined as  liftA2 (*>).%sequence $ Just (print 1) *>> (**:) 21Just 2"(-*) (print 1) *>> return (Just 2)1Just 27The lifted function of q , 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]8"Combination consisted of sequence 6 and cover +.print 1 -*> (*:) (Just 2)1Just 29"Combination consisted of sequence 7 and cover +.(*:) (Just 2) <-* print 11Just 2%print 1 -*> (*:) (Just 3) <-* print 212Just 3%print 1 -*> (*:) (Just 3) <*- Nothing1Nothing:"Combination consisted of sequence 6 and cover #.$sequence $ print 1 *-> Just ((*:) 2)1Just 2;"Combination consisted of sequence 7 and cover #.$sequence $ Just ((*:) 2) <*- print 11Just 20sequence $ print 1 *-> Just ((*:) 3) <*- print 212Just 30sequence $ print 1 *-> Just ((*:) 3) <-* NothingNothingb!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrrstuvwxyz{|}~~omstuvwxyz{|}~nqp!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~a!"#$%&'()*+,-./0123456789:;<?>=@ABCDEFGHIKJLMNOQPRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~b!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrrstuvwxyz{|}~a!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~$Enable deep level Monad programming.(C) 2015 KONISHI Yohsuke 4BSD-style (see the LICENSE file in the distribution)ocean0yohsuke@gmail.com experimental---SafeThe 5 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"]]The 5 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]Bind function of level-2. Alias for l. Just -< 3Just 3#The auguments-flipped function for . 3 >- JustJust 3:{let plus :: Int -> Int -> Int plus x y =  x >- \a -> y >- \b -> a + b in plus 3 4:}7 Alias for . ((3+) <-< (2*) <-< (1+)) -< 17#The auguments-flipped function for . 1 >- ((+1) >-> (*2) >-> (+3))7#The auguments-flipped function for . Composite function of level-2.Sequence function of level-2.!Bind-cover function made of bind  and cover + , defined as m >-== k = (-*) m >>== k.!Bind-cover function made of bind  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.1O%-!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  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. untransfold5 . transfold5 == idFollowing property holds. untransfold4 . transfold4 == idFollowing property holds. untransfold3 . transfold3 == idFollowing property holds. untransfold2 . transfold2 == idRequired only for  and   Alias for       !"#$%&'()*+,-./01234567}      !"#$%&'()*+,-./01234567}      !"#$%&'()*+,-./01234567b      !"#$%&'()*+,-./012345673  #$%&'()*+,-./012345---@(c) 2007 Magnus Therning, (C) 2015 KONISHI Yohsuke BSD-style (see the file LICENSE)ocean0yohsuke@gmail.com experimental---None-./>CLG89:;<=>?@ABCDEFGHIJKLMNO     !89:;<=>?@ABCDEFGHIJKLMNOABCDEF>?@GHI;<=JKL89:MNO?89:;<=>?@ABCDEFGHIJKLMNO      (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 PQRSTUVWE !"#$%&'()*+PQRSTUVWPQRSTUVW PQRSTUVW (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 XYZ[,-./0e123456789:;<=>?@ABCDEFGHIJKLMNOPQR STUVWXYZ[XYZ[XYZ[ XYZ[,-./0(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>L\]?^_`abcdefg\]'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>LhiEjkl mnopqrstuvwxyhi%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>Lz{s123456789:;<=>?@ABCDEFGHIJKLMNOP|^jkl QR }~  z{ $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\]^_`abcdefg,\]^_`abcdefg efgbcd_`a\]^ \]^_`abcdefg !"!#!$!%&'&(&)&*&+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSSTUUVWWXYYZ[\]^_`abcdef g h i j k l m n o p q r s s t u u v w w x y y z{|{}{~{         !"#$%&'(')')*+*,*-*.*/*/ 0 1 2 3 4565789:;:<:=>?>?>@>A>B>C>D>E>F G H I J KLMLNLOLOLPLQLQLRLSLSLTLULULVLWLWLXLYLYLZL[L[L\L]L]L^L_L_`abc&d&efgfgfhfifjfkflfmfnopqrsrsrtrurvrwrxryrz{|!}!~!        deepc_BvPAyDmXgYMHK3AKkCfXwADeepControl.Monad.TransDeepControl.Monad.Trans.RWSDeepControl.Monad.SignaturesDeepControl.ApplicativeDeepControl.MonadDeepControl.CommutativeDeepControl.Monad.Morph DeepControl.Monad.Trans.IdentityDeepControl.Monad.Trans.ExceptDeepControl.Monad.Trans.WriterDeepControl.ArrowData.Traversable sequenceAtraversefor Data.FoldablefoldMapDeepControl.Monad.Trans.ReaderDeepControl.Monad.Trans.Statetrans_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|>||<||>>||<<||>>>||<<<||>>>>||<<<<||>>>>>||<<<<<|MonadTransCover5|----*||---*-||--*--||-*---||*----|MonadTransFold5 transfold5 untransfold5T3___T2___T____M____MonadTrans5Down Trans5Down MonadTrans5liftT5MonadTransCover4|---*||--*-||-*--||*---|MonadTransFold4 transfold4 untransfold4T2__T___M___MonadTrans4Down Trans4Down MonadTrans4liftT4MonadTransCover3|--*||-*-||*--|MonadTransFold3 transfold3 untransfold3T__M__MonadTrans3Down Trans3Down MonadTrans3liftT3MonadTransCover2|-*||*-|MonadTransFold2 transfold2 untransfold2M_T_MonadTrans2Down Trans2Down MonadTrans2liftT2 MonadTrans_transuntransMonadTransCover|*|MMonadTransDown TransDownliftTliftTTliftTTTliftTTTT liftTTTTTliftTT2liftTTT2 liftTTTT2 liftTTTTT2|**|trans2untrans2liftTT3liftTTT3 liftTTTT3 liftTTTTT3|***||-**||*-*||**-|trans3untrans3|****||--**||-*-*||-**-||*-*-||**--||*--*||-***||*-**||**-*||***-|trans4untrans4|---**||--*-*||-*--*||*---*||*--*-||*-*--||**---||--***||-*-**||*--**||*-*-*||**--*||**-*-||***--||-****||*-***||**-**||***-*||****-|trans5untrans5 IdentityT5 runIdentityT5 IdentityT4 runIdentityT4 IdentityT3 runIdentityT3 IdentityT2 runIdentityT2 mapIdentityT2 liftCallCC2 liftCatch2 mapIdentityT3 liftCallCC3 liftCatch3 mapIdentityT4 liftCallCC4 liftCatch4 mapIdentityT5 liftCallCC5 liftCatch5 throwError2 catchError2 throwError3 catchError3 throwError4 catchError4 throwError5 catchError5listen2pass2listen3pass3Kleisli5 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 generalizeMFunctorembedMMonadT2_|*****|$fMonadTrans_ExceptT$fMonadTrans_MaybeT$fMonadTrans_ListT$fMonadTransCoverExceptT$fMonadTransCoverMaybeT$fMonadTransCoverListT$fMonadTransDownExceptT$fMonadTransDownMaybeT$fMonadTransDownListTlift2IdentityT2lift3IdentityT3lift4IdentityT4lift5IdentityT5$fMonadTransCover5IdentityT5$fMonadTransFold5IdentityT5$fMonadTrans5DownIdentityT5$fMonadIOIdentityT5$fMonadTrans5IdentityT5$fMonadPlusIdentityT5$fAlternativeIdentityT5$fMonadIdentityT5$fApplicativeIdentityT5$fCommutativeIdentityT5$fMonadTransCover4IdentityT4$fMonadTransFold4IdentityT4$fMonadTrans4DownIdentityT4$fMonadIOIdentityT4$fMonadTrans4IdentityT4$fMonadPlusIdentityT4$fAlternativeIdentityT4$fMonadIdentityT4$fApplicativeIdentityT4$fCommutativeIdentityT4$fMonadTransCover3IdentityT3$fMonadTransFold3IdentityT3$fMonadTrans3DownIdentityT3$fMonadIOIdentityT3$fMonadTrans3IdentityT3$fMonadPlusIdentityT3$fAlternativeIdentityT3$fMonadIdentityT3$fApplicativeIdentityT3$fCommutativeIdentityT3$fMonadTransCover2IdentityT2$fMonadTransFold2IdentityT2$fMonadTrans2DownIdentityT2$fMonadIOIdentityT2$fMonadTrans2IdentityT2$fMonadPlusIdentityT2$fAlternativeIdentityT2$fMonadIdentityT2$fApplicativeIdentityT2$fCommutativeIdentityT2$fMonadTransCoverIdentityT$fMonadTransDownIdentityT$fCommutativeIdentityTData.Functor.Identity runIdentityIdentityControl.Monad.Trans.Identity liftCatch liftCallCC mapIdentityT runIdentityT IdentityT$fMonad5ExceptT$fMonad4ExceptT$fMonad3ExceptT$fMonad2ExceptT$fCommutativeExceptTControl.Monad.FixmfixMonadFix Data.FunctionfixControl.Monad.Error.Class catchError throwError MonadErrorControl.Monad.Trans.ExceptExceptTExcept runExcept mapExcept withExcept runExceptT mapExceptT withExceptT$fMonad5WriterT$fMonad4WriterT$fMonad3WriterT$fMonad2WriterT$fCommutativeWriterT Data.Monoid<>getDualDualappEndoEndogetAllAllgetAnyAnygetSumSum getProductProductgetFirstFirstgetLastLastgetAltAltmconcatmappendmemptyMonoidcensorlistensControl.Monad.Trans.Writer.LazyWriterT runWriterTWriter runWriter execWriter mapWriter execWriterT mapWriterT$fMonadTransCoverReaderT$fMonadTransDownReaderTasksControl.Monad.Trans.ReaderReaderT runReaderTReader runReader mapReader withReader mapReaderT withReaderT$fMonadTransCoverStateT$fMonadTransDownStateTgetsmodify'modifyControl.Monad.Trans.State.LazyStateT runStateTStaterunState evalState execStatemapState withState evalStateT execStateT mapStateT withStateT$fMonadTransCoverRWST$fMonadTransDownRWSTControl.Monad.RWS.ClassMonadRWSControl.Monad.Trans.RWS.LazyRWSTrunRWSTRWSrwsrunRWSevalRWSexecRWSmapRWSwithRWSevalRWSTexecRWSTmapRWSTwithRWST$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>>><<<