úÎ<Ý8ž;      !"#\$%&'()*+,-./012345678 9 : portable provisionalEdward Kmett <ekmett@gmail.com>A ; sans <. Minimal definition: Either  or  OIf defining both, then the following laws (the default definitions) must hold:   join = (>>- id)  m >>- f = join (fmap f m) Laws:  4 induced definition of <.>: f <.> x = f >>- (<\$> x) 1Finally, there are two associativity conditions:  G associativity of (>>-): (m >>- f) >>- g == m >>- (\x -> f x >>- g) ; associativity of join: join . join = join . fmap join ?These can both be seen as special cases of the constraint that ; associativity of (->-): (f ->- g) ->- h = f ->- (g ->- h) 8Transform a Apply into an Applicative by adding a unit.  Wrap an = to be used as a member of   )A strong lax semi-monoidal endofunctor.  This is equivalent to an = without >. Laws: B associative composition: (.) <\$> u <.> v <.> w = u <.> (v <.> w) a .> b = const id  \$ a  . b a  . b = const <\$ a  . b TODO: move into Data.Functor  A variant of  with the arguments reversed. 3Lift a binary function into a comonad with zipping 4Lift a ternary function into a comonad with zipping ?An @ is a =, but it is an instance of  AA B is not a ;, but it is an instance of  CAn IntMap is not =, but it is an instance of   D A Map is not =, but it is an instance of          portable provisionalEdward Kmett <ekmett@gmail.com>1A subset of monad transformers can transform any  as well. portable provisionalEdward Kmett <ekmett@gmail.com> !"E sans F # !"#"# ! ! !"##portable provisionalEdward Kmett <ekmett@gmail.com>\$%&\$%&\$%&\$%&%& portable provisionalEdward Kmett <ekmett@gmail.com>    portable provisionalEdward Kmett <ekmett@gmail.com> GHI'()*+,-EUsable default for foldMap, but only if you define foldMap1 yourself '()*+,-'()*+,-'()()*+,-portable provisionalEdward Kmett <ekmett@gmail.com>./01./01./01./0/01portable provisionalEdward Kmett <ekmett@gmail.com>2Laws:  C <!> is associative: (a <!> b) <!> c = a <!> (b <!> c) K <\$> left-distributes over <!>: f <\$> (a <!> b) = (f <\$> a) <!> (f <\$> b) If extended to an J then 3 should equal K. Ideally, an instance of 2 also satisfies the "left distributon" law of  MonadPlus with respect to  .:  K <.> right-distributes over <!>: (a <!> b) <.> c = (a <.> c) <!> (b <.> c) But L, M, N a, OP e m, and STM satisfy the alternative  " left catch" law instead:   pure a <!> b = pure a PHowever, this variation cannot be stated purely in terms of the dependencies of 2. JWhen and if MonadPlus is successfully refactored, this class should also * be refactored to remove these instances. BThe right distributive law should extend in the cases where the a  or ; is = provided to yield variations of the right distributive law: + (m <!> n) >>- f = (m >>- f) <!> (m >>- f) + (m <!> n) >>= f = (m >>= f) <!> (m >>= f) 3( |) without a required empty 45Q-This instance does not actually satisfy the ( .) right distributive law  It instead satisfies the  Left-Catch law  234523452345345portable provisionalEdward Kmett <ekmett@gmail.com>6Laws:   zero <!> m = m  m <!> zero = m If extended to an J then 7 should equal R. 7 23456767677 89:89:89:89:9:S     !"#\$%&'()**+,-./01123456789:;<=>?@ABC D D E F G HI HJKLMNOLPQRS TU TVWWX HY HZ [\]^_ `abcdbcde Hfgsemigroupoids-1.2.5Data.Functor.BindData.Functor.Bind.TransData.SemigroupoidData.Semigroupoid.DualData.Semigroup.FoldableData.Semigroup.TraversableData.Functor.AltData.Functor.PlusData.Semigroupoid.StaticData.Traversable.InstancesData.Functor.ApplybaseGHC.BasefmapFunctor Data.Functor<\$><\$Bind>>-join MaybeApply runMaybeApplyWrappedApplicativeWrapApplicativeunwrapApplicativeApply<.>.><.\$><..>liftF2liftF3 returning-<<->--<- apDefault BindTransliftBSemigetSemiWrappedCategory WrapCategoryunwrapCategory SemigroupoidoDualgetDual Foldable1fold1foldMap1 traverse1_for1_ sequenceA1_foldMapDefault1 Traversable1 traverse1 sequence1foldMap1DefaultAltsomemanyPluszeroStatic runStaticMonadreturnControl.Applicative Applicativepure \$fBindIntMapcontainers-0.4.1.0 Data.IntMapIntMap \$fBindMapData.MapMap \$fApplyIntMap \$fApplyMapControl.CategoryCategoryidActgetAct Alternative<|> Data.MaybeMaybeghc-prim GHC.TypesIO Data.EitherEithertransformers-0.2.2.0Control.Monad.Trans.ErrorErrorT\$fAltIOempty