NB/>      !"#$%&'()*+,-./0123456789 : ; < =  Safe-Inferredportable provisionalEdward Kmett <ekmett@gmail.com> Safe-Inferred  duplicated = extended id 2 fmap (fmap f) . duplicated = duplicated . fmap f  # extended f = fmap f . duplicated >?@ABCDEFG >?@ABCDEFGportable provisionalEdward Kmett <ekmett@gmail.com>None A H sans I. 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 J to be used as a member of  (A strong lax semi-monoidal endofunctor.  This is equivalent to an J without K. Laws: B associative composition: (.) <$> u <.> v <.> w = u <.> (v <.> w)   a .> b = const id <$> a <.> b   a <. b = const <$> a <.> b  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 LAn M is a J, but it is an instance of  NA O is not a H, but it is an instance of  PAn IntMap is not J, but it is an instance of  Q A Map is not J, but it is an instance of  Y RSLNTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PQ   P  RSLNTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PQportable provisionalEdward Kmett <ekmett@gmail.com>None1A subset of monad transformers can transform any  as well.  portable provisionalEdward Kmett <ekmett@gmail.com>None% sans   !"#$%& !"#$%&%&"#$ !  !"#$%&portable provisionalEdward Kmett <ekmett@gmail.com>None'()'()'()'() portable provisionalEdward Kmett <ekmett@gmail.com>None  portable provisionalEdward Kmett <ekmett@gmail.com>None0EUsable default for foldMap, but only if you define foldMap1 yourself *+,-./0*+,-./0*+,-./0*+,-./0portable provisionalEdward Kmett <ekmett@gmail.com>None 1234123412341234portable provisionalEdward Kmett <ekmett@gmail.com>None5Laws:  C <!> is associative: (a <!> b) <!> c = a <!> (b <!> c) K <$> left-distributes over <!>: f <$> (a <!> b) = (f <$> a) <!> (f <$> b) If extended to an  then 6 should equal . Ideally, an instance of 5 also satisfies the "left distributon" law of  MonadPlus with respect to  .:  K <.> right-distributes over <!>: (a <!> b) <.> c = (a <.> c) <!> (b <.> c) But , ,  a,  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 5. IWhen 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 H is = provided to yield variations of the right distributive law: + (m <!> n) >>- f = (m >>- f) <!> (m >>- f) + (m <!> n) >>= f = (m >>= f) <!> (m >>= f) 6( |) without a required empty -This instance does not actually satisfy the ( .) right distributive law  It instead satisfies the  Left-Catch law 5678 567856785678 portable provisionalEdward Kmett <ekmett@gmail.com>None9Laws:   zero <!> m = m  m <!> zero = m If extended to an  then : should equal . 9: 56789:9:9: None;<=;<=;<=;<=     !"#$%&'()*+,-./001234567789:;<=>?@ABCDEFG H I J J KLMNOPQRSTU V W XY XZ[\]^_\`abcdefghijklmnopqrstuvwxyz{|}~   X X   X                semigroupoids-3.0.2Data.Functor.BindData.Functor.ExtendData.Functor.Bind.TransData.SemigroupoidData.Semigroupoid.DualData.Semigroup.FoldableData.Semigroup.TraversableData.Functor.AltData.Functor.PlusData.Semigroupoid.StaticData.Traversable.InstancesData.Functor.ApplybaseGHC.BasefmapFunctor Data.Functor<$><$comonad-3.0.1.1Control.Comonad$>Extend duplicatedextendedBind>>-join MaybeApply runMaybeApplyWrappedApplicativeWrapApplicativeunwrapApplicativeApply<.>.><.<..>liftF2liftF3 returning-<<->--<- apDefault BindTransliftBSemigetSemiWrappedCategory WrapCategoryunwrapCategory SemigroupoidoDualgetDual Foldable1fold1foldMap1 traverse1_for1_ sequenceA1_foldMapDefault1 Traversable1 traverse1 sequence1foldMap1DefaultAltsomemanyPluszeroStatic runStatic$fExtendNonEmpty$fExtendIdentityT$fExtendIdentity $fExtendTree $fExtendSeq $fExtend(->) $fExtend(,)$fExtendEither $fExtendMaybe $fExtend[]MonadreturnControl.Applicative Applicativepure $fBindIntMapcontainers-0.5.0.0Data.IntMap.BaseIntMap $fBindMap Data.Map.BaseMap $fApplyIntMap $fApplyMap $fBindTree $fBindSeq $fBindContT $fBindRWST $fBindRWST0 $fBindStateT $fBindStateT0 $fBindWriterT$fBindWriterT0 $fBindReaderT $fBindErrorT $fBindListT $fBindMaybeT$fBindWrappedMonad$fBindIdentityT$fBindIdentity $fBindOption $fBindMaybe$fBindIO$fBindNonEmpty$fBind[] $fBind(->) $fBindProduct $fBindEither $fBind(,)$fApplyCokleisli$fComonadMaybeApply$fExtendMaybeApply$fApplicativeMaybeApply$fApplyMaybeApply$fFunctorMaybeApply$fAlternativeWrappedApplicative$fApplicativeWrappedApplicative$fApplyWrappedApplicative$fFunctorWrappedApplicative $fApplyContT $fApplyRWST $fApplyRWST0 $fApplyStateT$fApplyStateT0$fApplyWriterT$fApplyWriterT0 $fApplyListT$fApplyReaderT $fApplyErrorT $fApplyMaybeT $fApplyTree $fApplySeq$fApplyWrappedArrow$fApplyWrappedMonad$fApplyIdentityT$fApplyIdentity $fApplyOption $fApplyMaybe $fApplyIO $fApply[]$fApplyZipList $fApply(->) $fApplyConst $fApplyEither$fApplyNonEmpty $fApply(,)$fApplyProduct$fApplyCompose$fBindTransContT$fBindTransRWST$fBindTransRWST0$fBindTransStateT$fBindTransStateT0$fBindTransWriterT$fBindTransWriterT0$fBindTransReaderT$fBindTransIdentityTControl.CategoryCategoryid$fCategorySemi$fSemigroupoidSemi$fCategoryWrappedCategory$fSemigroupoidWrappedCategory$fSemigroupoidOp$fSemigroupoidCokleisli$fSemigroupoidKleisli$fSemigroupoid(->)$fCategoryDual$fSemigroupoidDualActgetAct $fFunctorAct$fSemigroupAct$fFoldable1NonEmpty$fFoldable1Product$fFoldable1Compose$fFoldable1IdentityT$fFoldable1Identity$fFoldable1Tree$fTraversable1NonEmpty$fTraversable1Tree$fTraversable1Product$fTraversable1Compose$fTraversable1IdentityT$fTraversable1Identity Alternative<|> Data.MaybeMaybeghc-prim GHC.TypesIO Data.EitherEithertransformers-0.3.0.0Control.Monad.Trans.ErrorErrorT$fAltIO $fAltRWST $fAltRWST0 $fAltWriterT $fAltWriterT0 $fAltStateT $fAltStateT0 $fAltListT $fAltErrorT $fAltMaybeT $fAltReaderT$fAltIdentityT$fAltWrappedApplicative $fAltNonEmpty$fAltSeq $fAltIntMap$fAltMap$fAltWrappedArrow$fAltWrappedMonad $fAltOption $fAltMaybe$fAlt[] $fAltEitherempty $fPlusRWST $fPlusRWST0 $fPlusWriterT$fPlusWriterT0 $fPlusStateT $fPlusStateT0 $fPlusListT $fPlusErrorT $fPlusMaybeT $fPlusReaderT$fPlusIdentityT$fPlusWrappedApplicative $fPlusSeq $fPlusIntMap $fPlusMap$fPlusWrappedArrow$fPlusWrappedMonad $fPlusOption $fPlusMaybe$fPlus[]$fPlusIO$fArrowChoiceStatic$fArrowPlusStatic$fArrowZeroStatic $fArrowStatic$fCategoryStatic$fSemigroupoidStatic$fComonadStatic$fExtendStatic$fApplicativeStatic $fPlusStatic $fAltStatic $fApplyStatic$fFunctorStatic