t      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  (C) 2011-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundepsSafe>?  (c) Edward Kmett 2011-2014BSD3ekmett@gmail.com experimentalNone;<=FST>A  functor f is  if   and ! witness an isomorphism to  (_ -> Rep f).   . ! "a id ! .   "a id   f (  g) =   (g . f) " " f p "a   $   (! p)   . f #  and !# form two halves of an isomorphism./This can be used with the combinators from the lens package. # ::  f => Iso' (a ->  f) (f a)! "#$ !"#$ !"(C) 2011-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs Trustworthy>?AQV <+An adjunction from Hask^op to Hask   (f a) b ~ Hask a (g b) / , =   . - =   Any adjunction from Hask to Hask^op would indirectly permit unsafePerformIO, and therefore does not exist.0. and /# form two halves of an isomorphism./This can be used with the combinators from the lens package. 0 :: + f g => Iso' (b -> f a) (a -> g b)1 Represent a  functor that has a left adjoint3This gives rise to the  Cont Bool  4This + gives rise to the Cont  +,-./012+,-./012+,-./(C) 2011 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundepsSafe>?"56789:8:9567567(c) Edward Kmett 2011-2014BSD3ekmett@gmail.com experimental Trustworthy37;<=>?FSTV< AOn the surface,  WrappedRec is a simple wrapper around F;. But it plays a very important role: it prevents generic Eu instances for recursive types from sending the typechecker into an infinite loop. Consider the following datatype: (data Stream a = a :< Stream a deriving (,  ) instance E Stream With A, we have its F being: F Stream =  () (A Stream) If A didn't exist, it would be: F0 Stream = Either () (Either () (Either () ...)) An infinite type! A& breaks the potentially infinite loop.DA default implementation of F( for a datatype that is an instance of . This is usually composed of ', tuples, unit tuples, and underlying F# values. For instance, if you have: 6data Foo a = MkFoo a (Bar a) (Baz (Quux a)) deriving (,  ) instance E Foo Then you'll get: D Foo = Either () (Either (A Bar) (A Baz, A Quux)) (See the Haddocks for A$ for an explanation of its purpose.)EA  f is E if G and H witness an isomorphism to (->) x.Every   is actually E.Every E & from Hask to Hask is a right adjoint. G . H "a id H . G "a id G .  "a  F3If no definition is provided, this will default to D.G  f . G "a G .  f 3If no definition is provided, this will default to I.H3If no definition is provided, this will default to J.IA default implementation of G in terms of D.JA default implementation of H in terms of D.KG and H# form two halves of an isomorphism./This can be used with the combinators from the lens package. K :: E f => Iso' (F f -> a) (f a)&>?@ABCDEFHGIJKLMNOPQRSTUVWXYZ[\]^_`abc(EFGGHHK>?@LUVTMbcNOQPRSZ[\]^WXY_`aDJIABC>?@ABCEFGGHH 2008-2013 Edward KmettBSDEdward Kmett <ekmett@gmail.com> experimentalrank 2 types, MPTCs, fundeps Trustworthy >?AQSTVcS $An adjunction between Hask and Hask.Minimal definition: both  and  or both  and e, subject to the constraints imposed by the default definitions that the following laws should hold. munit = leftAdjunct id counit = rightAdjunct id leftAdjunct f = fmap f . unit rightAdjunct f = counit . fmap f.Any implementation is required to ensure that  and  witness an isomorphism from  Nat (f a, b) to  Nat (a, g b) .rightAdjunct unit = id leftAdjunct counit = id and # form two halves of an isomorphism./This can be used with the combinators from the lens package.  ::  f u => Iso' (f a -> b) (a -> u b)SEvery right adjoint is representable by its left adjoint applied to a unit elementUse this definition and the primitives in Data.Functor.Representable to meet the requirements of the superclasses of Representable.5This definition admits a default definition for the H> method of 'Index", one of the superclasses of Representable.>A right adjoint functor admits an intrinsic notion of zipping*Every functor in Haskell permits unzipping:A left adjoint must be inhabited, or we can derive bottom.;And a left adjoint must be inhabited by exactly one element!Every functor in Haskell permits  uncozipping (C) 2011-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundepsSafe>?WhExploiting this instance requires that we have the missing Traversables for Identity, (,)e and IdentityT (C) 2011-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundepsSafe>?ZR'(c) Edward Kmett & Sjoerd Visscher 2011BSD3ekmett@gmail.com experimentalSafe ;<=>?FTy_ +A state transformer monad parameterized by:g? - A representable functor used to memoize results for a state Rep gm - The inner monad.The , function leaves the state unchanged, while >>=T uses the final state of the first computation as the initial state of the second.@A memoized state monad parameterized by a representable functor g!, where the representatation of g, Rep g is the state to carry.The , function leaves the state unchanged, while >>=T uses the final state of the first computation as the initial state of the second.AUnwrap a state monad computation as a function. (The inverse of .)rEvaluate a state computation with the given initial state and return the final value, discarding the final state.  m s =  ( m s)rEvaluate a state computation with the given initial state and return the final state, discarding the final value.  m s =  ( m s)UMap both the return value and final state of a computation using the given function.  ( f m) = f .  mrEvaluate a state computation with the given initial state and return the final value, discarding the final state.  m s =   ( m s)rEvaluate a state computation with the given initial state and return the final state, discarding the final value.  m s =   ( m s)Uniform lifting of a callCCj operation to the new monad. This version rolls back to the original state on entering the continuation.In-situ lifting of a callCC operation to the new monad. This version uses the current state on entering the continuation. It does not satisfy the laws of a monad transformer.$state-passing computation to execute initial statereturn value and final state$state-passing computation to execute initial value%return value of the state computation$state-passing computation to execute initial value final state  =(c) Edward Kmett 2011, (c) Conal Elliott 2008BSD3ekmett@gmail.com experimentalSafe&';<=>?FST|$1 >?@ABCDEFHGIJKLMNOPQRSTUVWXYZ[\]^_`abc  '(c) Edward Kmett & Sjoerd Visscher 2011BSD3ekmett@gmail.com experimentalSafe ;<=>?FT-A store transformer comonad parameterized by:g@ - A representable functor used to memoize results for an index Rep gw - The inner comonad.BA memoized store comonad parameterized by a representable functor g!, where the representatation of g, Rep g is the index of the store.\Construct a store comonad computation from a function and a current index. (The inverse of .)AUnwrap a state monad computation as a function. (The inverse of state.) computationindexa store to access initial state         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEEFGHIJKLMMNOPQR./01ST3UVWXYZ[\]^_`abcdefghijklmnopqrstuv56wx7yz{|}~: ; < = > ? @ E E F G H I J K L E E F G H I L      &adjunctions-4.4-BkLDvsPev1w55XITtPImap#Control.Comonad.Representable.Store!Control.Monad.Representable.State"Control.Monad.Representable.ReaderControl.Monad.Trans.ContsData.Functor.Contravariant.Rep%Data.Functor.Contravariant.Adjunction)Control.Monad.Trans.Contravariant.AdjointData.Functor.RepData.Functor.AdjunctionControl.Monad.Trans.AdjointControl.Comonad.Trans.Adjoint$comonad-5.0.2-9aHGfiTnx05C06L3T42NQuControl.Comonad.Store.Class experimentseeksseekpeekspeekpos ComonadStore mtl-2.2.1-DscMMmDQUE6GBfOSl4qMUHControl.Monad.State.Classstateputget MonadStateControl.Monad.Reader.Classreaderlocalask MonadReaderContsT runContsTContsContcontrunContcontsrunContscallCC$fMonadTransContsT $fMonadContsT$fApplicativeContsT $fApplyContsT$fFunctorContsT RepresentableReptabulateindexcontramapWithRep tabulated contramapRep$fRepresentable:*:$fRepresentableU1$fRepresentableProduct$fRepresentablePredicate$fRepresentableOp$fRepresentableProxy Adjunctionunitcounit leftAdjunct rightAdjunct adjunctedcontrarepAdjunctioncoindexAdjunction$fAdjunctionPredicatePredicate$fAdjunctionOpOpAdjointT runAdjointTAdjointadjoint runAdjoint$fMonadAdjointT$fApplicativeAdjointT$fFunctorAdjointTCounCo WrappedRepWrapRep unwrapRepGRep gtabulategindexfmapReppureRepbindRepmfixRep mzipWithRepmzipRepaskReplocalRepapRep distributeRep collectRepduplicateRepBy extendRepBy extractRepBy duplicatedRep extendedRep duplicateRep extendRep extractRepimapRep ifoldMapRep itraverseRepliftR2liftR3 $fGTabulateM1$fGTabulatePar1$fGTabulate:*: $fGIndexM1 $fGIndexPar1 $fGIndex:*:$fRepresentableM1$fRepresentableRec1$fRepresentablePar1$fRepresentable:.:$fRepresentableComplex$fRepresentableSum$fRepresentableDual$fRepresentableReverse$fRepresentableBackwards$fRepresentableCofree$fRepresentableProduct0$fRepresentableCompose$fRepresentableReaderT$fRepresentable(->)$fRepresentableIdentityT$fRepresentableTagged$fRepresentableIdentity $fGIndexRec1$fGTabulateRec1 $fGIndex:.:$fGTabulate:.:$fComonadTransCo $fComonadCo $fExtendCo$fMonadReaderaCo $fMonadCo$fBindCo$fDistributiveCo$fApplicativeCo $fApplyCo$fRepresentableCo$fRepresentableTracedT $fFunctorCotabulateAdjunctionindexAdjunctionzapWithAdjunctionsplitLunsplitLextractL duplicateLzipRunzipRabsurdL unabsurdLcozipLuncozipL$fAdjunction:+::*:$fAdjunction:.::.:$fAdjunctionRec1Rec1$fAdjunctionPar1Par1$fAdjunctionV1U1$fAdjunctionFreeCofree$fAdjunctionSumProduct$fAdjunctionComposeCompose$fAdjunctionWriterTTracedT$fAdjunctionEnvTReaderT$fAdjunctionIdentityTIdentityT$fAdjunctionIdentityIdentity$fAdjunction(,)(->)$fMonadTransAdjointT$fComonadTransAdjointT$fComonadAdjointT$fExtendAdjointTStateT getStateTStaterunState evalState execStatemapStatestateT runStateT mapStateT evalStateT execStateT liftCallCC liftCallCC'$fMonadFreefStateT$fMonadContStateT$fMonadWriterwStateT$fMonadReadereStateT$fMonadStatesStateT$fMonadTransStateT$fBindTransStateT $fMonadStateT $fBindStateT$fApplicativeStateT $fApplyStateT$fFunctorStateTReaderT getReaderTReader runReaderreaderT runReaderT$fTraversable1ReaderT$fTraversableReaderT$fFoldable1ReaderT$fFoldableReaderT$fMonadWriterwReaderT$fMonadIOReaderT$fComonadReaderT$fExtendReaderT$fDistributiveReaderT$fMonadTransReaderT$fMonadReaderT $fBindReaderT$fApplicativeReaderT$fApplyReaderT$fFunctorReaderTStoreTStorestorerunStorestoreT runStoreT$fComonadCofreefStoreT$fComonadEnvmStoreT$fComonadTracedmStoreT$fComonadHoistStoreT$fComonadTransStoreT$fComonadStoreT$fExtendStoreT$fApplicativeStoreT$fComonadApplyStoreT $fApplyStoreT$fFunctorStoreT$fComonadStoresStoreT*contravariant-1.4.1-IU4rlC99MOgBhZQa6a2b8NData.Functor.Contravariant Contravariant contramapbase Data.EithereitherGHC.BaseidOpMonadFunctor GHC.GenericsGeneric1Either)distributive-0.5.3-L7CArquUCblDevaNgAwzQRData.Distributive DistributivereturnfmapGIndexgindex' GTabulate gtabulate' Data.TuplefstsndliftM