D ;H      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG experimentalekmett@gmail.com Safe-InferedA H f is  if  and I witness an isomorphism to (->) x.  tabulate . index = id  index . tabulate = id  tabulate . return f = return f  ' fmap f . tabulate = tabulate . fmap f /  !JKLMNOPQRSTUVWXYZ[\]^_`a  !  !,   !JKLMNOPQRSTUVWXYZ[\]^_`a experimentalekmett@gmail.com Safe-Infered!"#$%&'(bcdefghijklmnopqrstuvwxyz{   !"#$%&'( %&"#$'("#$%&'(bcdefghijklmnopqrstuvwxyz{ experimentalekmett@gmail.com Safe-Infered ),A state transformer monad parameterized by:  g? - A representable functor used to memoize results for a state Key g  m - The inner monad. The |, function leaves the state unchanged, while >>= uses B 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, Key g is the state to carry. The |, function leaves the state unchanged, while >>= uses B the final state of the first computation as the initial state of  the second. -0Unwrap a state monad computation as a function.  (The inverse of }.) .:Evaluate a state computation with the given initial state 9 and return the final value, discarding the final state.  . m s = ~ (- m s)/:Evaluate a state computation with the given initial state 9 and return the final state, discarding the final value.  / m s =  (- m s)0AMap both the return value and final state of a computation using  the given function.  - (0 f m) = f . - m4:Evaluate a state computation with the given initial state 9 and return the final value, discarding the final state.  4 m s =  ~ (2 m s)5:Evaluate a state computation with the given initial state 9 and return the final state, discarding the final value.  5 m s =   (2 m s)6Uniform lifting of a callCC operation to the new monad. ? This version rolls back to the original state on entering the  continuation. 7In-situ lifting of a callCC operation to the new monad. C This version uses the current state on entering the continuation. 6 It does not satisfy the laws of a monad transformer. )*+,-%state-passing computation to execute initial state return 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 01234567 )*+,-./01234567,-./0)*+1245367  )*+,-./01234567 experimentalekmett@gmail.com Safe-Infered8.A store transformer comonad parameterized by:  g@ - A representable functor used to memoize results for an index Key g  w - The inner comonad. :BA memoized store comonad parameterized by a representable functor g, where  the representatation of g, Key g is the index of the store. ;KConstruct a store comonad computation from a function and a current index.  (The inverse of <.) <0Unwrap a state monad computation as a function.  (The inverse of state.) 89:; computation index <a store to access initial state => 89:;<=> :;<89=>89:;<=> experimentalekmett@gmail.com Safe-Infered?A H f is ? if @ and B witness an isomorphism to (_ -> Value f).  tabulate . index = id  index . tabulate = id  tabulate . return f = return f @ ' contramap f (corep g) = corep (g . f) ADual to Indexed. CDual to Keyed. ?@ABCDEFG ?@ABCDEFG ECDAB?@FG?@ABCDEFG          !"#$%&'()*+,,-./01223456789:;<=>?@@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~iOP OOOrepresentable-functors-3.0#Control.Comonad.Representable.Store"Control.Monad.Representable.Reader!Control.Monad.Representable.StateData.Functor.RepresentableData.Functor.Corepresentablecomonads-fd-3.0Control.Comonad.Store.Classseeksseekpeekspeekpos mtl-2.1.2Control.Monad.Reader.ClasslocalaskControl.Monad.State.ClassgetsmodifyputgetRepunrep RepresentabletabulatefmapRep mapWithKeyReppureRepbindRepbindWithKeyRepaskReplocalRepapRep zipWithRep zipWithKeyRep distributeRep duplicatedRep extendedRep duplicateRep extendRep extractRepliftR2liftR3ReaderT getReaderTReader runReaderreaderT runReaderTStateT getStateTStaterunState evalState execStatemapStatestateT runStateT mapStateT evalStateT execStateT liftCallCC liftCallCC'StoreTStorestorerunStorestoreT runStoreTCorepresentablecorep CoindexedcoindexValuedcontramapWithValueValuecontramapDefaultcontramapWithValueDefaultbaseGHC.BaseFunctorkeys-3.0Data.Keyindex$fComonadTransRep $fComonadRep $fExtendRep$fZipWithKeyRep$fZipRep$fMonadReaderaRep $fMonadRep $fBindRep$fDistributiveRep$fApplicativeRep $fApplyRep $fFunctorRep $fLookupRep $fKeyedRep$fIndexableRep$fRepresentableRep$fRepresentableCofree$fRepresentableProduct$fRepresentableTracedT$fRepresentableCompose$fRepresentableReaderT$fRepresentable(->)$fRepresentableIdentityT$fRepresentableIdentity$fTraversableWithKey1ReaderT$fTraversableWithKeyReaderT$fTraversable1ReaderT$fTraversableReaderT$fFoldableWithKey1ReaderT$fFoldableWithKeyReaderT$fFoldable1ReaderT$fFoldableReaderT$fAdjustableReaderT$fMonadWriterwReaderT$fMonadIOReaderT$fComonadReaderT$fZipWithKeyReaderT $fZipReaderT$fExtendReaderT$fLookupReaderT$fKeyedReaderT$fDistributiveReaderT$fMonadTransReaderT$fMonadReaderT $fBindReaderT$fApplicativeReaderT$fApplyReaderT$fIndexableReaderT$fFunctorReaderTreturnstate Data.Tuplefstsnd Control.MonadliftM$fMonadFreefStateT$fMonadContStateT$fMonadWriterwStateT$fMonadReadereStateT$fMonadStatesStateT$fMonadTransStateT$fBindTransStateT $fMonadStateT $fBindStateT$fApplicativeStateT $fApplyStateT$fFunctorStateT$fComonadCofreefStoreT$fComonadEnvmStoreT$fComonadTracedmStoreT$fComonadHoistStoreT$fComonadTransStoreT$fComonadStoreT$fExtendStoreT$fApplicativeStoreT$fComonadApplyStoreT $fApplyStoreT$fFunctorStoreT$fComonadStoresStoreT$fCoindexedCoproduct$fCorepresentableProduct$fCoindexedProduct$fValuedProduct$fCorepresentablePredicate$fCoindexedPredicate$fValuedPredicate$fCorepresentableOp $fCoindexedOp $fValuedOp