w3      !"#$%&'()*+,-./0123456789:;<=>?@ABCD E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u vwxyz{|}~portable experimentalekmett@gmail.com Safe-Inferednon-portable (MPTCs) experimentalekmett@gmail.comNone$This type may be best read infix. A c  m is a  m that maps  values of type c through unit to values of type m. A c- may also ) supply operations which tack-on another c to an existing  m on the left P or right. These specialized reductions may be more efficient in some scenarios $ and are used when appropriate by a  Generator . The names  and  work = by analogy to the synonymous operations in the list monoid. LThis class deliberately avoids functional-dependencies, so that () can be a c -Reducer  for all cJ, and so many common reducers can work over multiple types, for instance,  First and Last may reduce both a and  a . Since a  Generator has a fixed element Z type, the input to the reducer is generally known and extracting from the monoid usually Z is sufficient to fix the result type. Combinators are available for most scenarios where X this is not the case, and the few remaining cases can be handled by using an explicit  type annotation. Minimal definition:  or  Convert a value into a  Append a value to a $ for use in left-to-right reduction Prepend a value onto a ( for use during right-to-left reduction Apply a  to a K container, after mapping the contents into a suitable form for reduction. Apply a  to a  mapping each element through      portable experimentalekmett@gmail.comNone     #non-portable (type families, MPTCs) experimentalekmett@gmail.com Safe-Infered A generalization of  to an arbitrary 9. May fail to terminate for some values in some monoids. A generalization of  to an arbitrary 9. May fail to terminate for some values in some monoids. A generalization of  to an arbitrary . Adapted from   Jhttp://augustss.blogspot.com/2008/07/lost-and-found-if-i-write-108-in.html      Safe-InferedThe  (,) over  a where  is the top element The  (,) over  a where  is the bottom element The  given by (,) The  (,) NoneThe  ('unionWith mappend',()! for containers full of monoids. !MPolymorphic containers that we can supply an operation to handle unions with $The  (),() 'A Container suitable for the $   !"#$%&'()  !"#$%&'() '()$%&!"#  !"#$%&'()portable experimentalekmett@gmail.com Safe-Infered*a 3 transformer that treats  as   This lets you use a  ByteString as a  source without going through a  transformer like UTF8 -a 3M transformer that asks only for the values contained in an indexed container 0a 3A transformer that asks only for the keys of an indexed container 3minimal definition 5 or 6 8Apply a  directly to the elements of a 3 $*+,-./0123456789:*+,-./0123456789:34567012-./*+,89:*+,-./0123456789:"portable (but instances use MPTCs) experimentalekmett@gmail.com Safe-Infered; Convert a  into a A . Mnemonic: Exp a * Exp b = Exp (a + b) > Convert a A into a  . Mnemonic: Log a + Log b = Log (a * b) ;<=>?@ABC ;<=>?@ABC ABC>?@;<=;<=>?@ABC portable experimentalEdward Kmett <ekmett@gmail.com> Safe-InferedD"Minimal definition over or grecip E x / yF x  yHMinimal complete definition: I or J DEFGHIJKDEFGHIJKHIJKDEFG DEFGHIJK non-portable (MPTCs) experimentalekmett@gmail.comNoneLif m is a Module over r and f is a  then f L m is a Module over r as well OA O turns any  instance into a .  It also provides a A instance for an  functor wrapped around a   and asserts that any  applied to a  forms a RightSemiNearRing  under these operations. RA R uses an glues together  actions with (*>)  in the manner of  traverse_ from  Data.Foldable. Any values returned by " reduced actions are discarded. U2Efficiently avoid needlessly rebinding when using & on an action that already returns () ; A rewrite rule automatically applies this when possible LMNOPQRSTU LMNOPQRSTU RSTOPQLMNU LMNOPQRSTU non-portable (MPTCs) experimentalekmett@gmail.comNoneVif m is a Module over r and f is a  then f V m is a Module as well YA Y turns any  instance into a .  It also provides a A instance for a  wrapped around a   and asserts that any  applied to a  forms a RightSemiNearRing  under these operations. \An \ uses glues together  actions with (>>)  in the manner of  from  Data.Foldable. Any values returned by " reduced actions are discarded. _2Efficiently avoid needlessly rebinding when using & on an action that already returns () ; A rewrite rule automatically applies this when possible VWXYZ[\]^_ VWXYZ[\]^_ \]^_YZ[VWXVWXYZ[\]^_ #non-portable (type families, MPTCs) experimentalekmett@gmail.com Safe-Infered` Efficiently 5 a 3 using the R4 monoid. A specialized version of its namesake from  Data.Foldable   5 T a!Convenience function as found in  Data.Foldable    ` b1The sum of a collection of actions, generalizing    : Q c Efficiently 5 a 3 using the \4 monoid. A specialized version of its namesake from  Data.Foldable and  Control.Monad   9 ^ d!Convenience function as found in  Data.Foldable and  Control.Monad    c e1The sum of a collection of actions, generalizing    : [ f Efficiently 5 a 3 using the  4 monoid. A specialized version of its namesake from  Data.Foldable   9   gType specialization of foldMap above h Efficiently 8 a 3 using the  4 monoid. A specialized version of its namesake from  Data.Foldable   :   i Convert any 3. to a list of its contents. Specialization of 8 j Efficiently 8 a 3 that contains values of type    :  k Efficiently 8 a 3 that contains values of type    :  l Efficiently 5 any 3C checking to see if any of its values match the supplied predicate   9  m Efficiently 5 any 3C checking to see if all of its values match the supplied predicate   9  n(Efficiently sum over the members of any 3   :  o2Efficiently take the product of every member of a 3   :  pCheck to see if l member of the 3 matches the supplied value qBCheck to make sure that the supplied value is not a member of the 3 r Efficiently 5 a subset of the elements in a 3 sjAllows idiomatic specialization of filter by proving a function that will be used to transform the output tA specialization of r using the  , analogous to    s  `abcdefghijklmnopqrst`abcdefghijklmnopqrstcde`abjklmfhigprstnoq`abcdefghijklmnopqrst portable experimentalekmett@gmail.com Safe-Infereduuuuportable experimentalekmett@gmail.com Safe-Inferedvwxvwxvwxvwxportable experimentalekmett@gmail.com Safe-Inferedyz{|}~DEFGHIJKvwxyz{|}~yz{|}~yz{|}~ !!"##$%%&''()*++,-./00123455677899:;<=>?@ABCCDEEFGHI J K L M N O P Q R R S T T U V V W X Y Y Z [ [ \ ] ] ^ _ ` a b c d e f g h i j k l m n o p q r s  tuvwxyz{|}~~~~~~~ ~~ ~~~c ~~~~~~~~ monoids-0.3.2Data.Monoid.AdditiveData.Monoid.ReducerData.Monoid.SelfData.Monoid.CombinatorsData.Monoid.OrdData.Monoid.UnionData.GeneratorData.Monoid.Multiplicative Data.GroupData.Monoid.ApplicativeData.Monoid.MonadData.Generator.CombinatorsData.Group.CombinatorsData.Monoid.SugarData.Group.Sugar Data.Listcyclerepeat replicatefindpluszeroReducerunitsnoccons foldMapReduce foldReduce returnUnitpureUnitSelfgetSelf MinPrioritygetMinPriority MaxPrioritygetMaxPriorityMingetMinMaxgetMax minfinityinfinity UnionWith getUnionWith HasUnionWith unionWith emptyWithUniongetUnionHasUnionemptyunionChar8getChar8Values getValuesKeysgetKeys GeneratorElem mapReducemapTomapFromreduce mapReduceWith reduceWithExpgetExpLoggetLogMultiplicativeonetimesMultiplicativeGroupoverundergrecipGroupgnegateminus gsubtractAppgetAppAltgetAlt Traversal getTraversal snocTraversalMongetMonMonadSum getMonadSumAction getAction snocAction traverse_for_asummapM_forM_msumfoldMap concatMapfoldtoListandoranyallsumproductelemnotElemfilter filterWith+*^-negatesubtract/.\.recip^^base Data.MonoidMonoid Data.MaybeMaybe Data.FoldableFoldable$fReduceraLast$fReducerMaybeLast$fReduceraFirst$fReducerMaybeFirst$fReduceraProduct $fReduceraSum$fReduceraDual$fReducer(->)Endo$fReducerBoolAll$fReducerBoolAny $fReducerc() $fReducerc[]$fReducerc(,,,)$fReducerc(,,) $fReducerc(,) $fFunctorSelf$fReducermSelfghc-prim GHC.ClassesminNothingmaxGHC.EnummaxBoundminBound$fFunctorMinPriority$fReducerMaybeMinPriority$fMonoidMinPriority$fOrdMinPriority$fFunctorMaxPriority$fReducerMaybeMaxPriority$fMonoidMaxPriority $fFunctorMin $fReduceraMin $fMonoidMin $fFunctorMax $fReduceraMax $fMonoidMax$fReducerfUnionWith$fMonoidUnionWith$fHasUnionWithMap$fHasUnionWithIntMap$fFunctorUnion$fReducerfUnion $fMonoidUnion$fHasUnionIntSet $fHasUnionSet $fHasUnion[] $fHasUnionMap$fHasUnionIntMapGHC.WordWord8 GHC.TypesChar$fGeneratorChar8$fGeneratorChar80$fGeneratorValues$fGeneratorValues0$fGeneratorValues1$fGeneratorKeys$fGeneratorKeys0$fGeneratorKeys1$fGeneratorArray$fGeneratorMap$fGeneratorIntMap$fGeneratorSet$fGeneratorIntSet$fGeneratorSeq$fGeneratorFingerTree $fGenerator[]$fGeneratorText$fGeneratorByteString$fGeneratorByteString0$fMultiplicativeFingerTree$fMultiplicativeSeq$fMultiplicativeRatio$fMultiplicativeInteger$fMultiplicativeInt$fMultiplicativeConst$fMultiplicativeZipList$fMultiplicativeIO$fMultiplicativeMaybe$fMultiplicative[]$fMultiplicativeSelf$fMultiplicativeExp $fMonoidLog$fMultiplicativeDual$fMultiplicativeGroupDual$fMultiplicativeGroupSelf$fMultiplicativeGroupExp $fGroupLog $fGroupSelf $fGroupDual$fGroupProduct $fGroupSumControl.Applicative Applicative Alternative $fReducercApp $fGroupApp $fMonoidApp $fReducerfAlt$fMultiplicativeAlt $fMonoidAlt$fReducerfTraversal$fMonoidTraversalGHC.BaseMonad Control.Monad MonadPlus $fReducercMon $fGroupMon $fMonoidMon$fReducermMonadSum$fApplicativeMonadSum$fFunctorMonadSum$fMultiplicativeMonadSum$fMonoidMonadSum$fReducermAction$fMonoidActionflipGHC.ListconcatBoolgetAllgetAnygetSum getProductFirstgetFirst