=9E      !"#$%&'()*+,-./0123456789:;<=>?@ABCDNone7>FK]7class  provides the same methods as   but generalized to work on any E.When a type has MonadPlus (or similar) properties, we can extract the Maybe and the Either, and generalize to Foldable and Bifoldable.DCompactable can always be described in terms of CompactFold, because compact = compactFoldand separate = separateFoldSas it's just a specialization. More exploration is needed on the relationship here. Class  W provides two methods which can be writen in terms of each other, compact and separate.@is generalization of catMaybes as a new function. Compact has relations with Functor, Applicative, Monad, Alternative, and Traversable. In that we can use these class to provide the ability to operate on a data type by throwing away intermediate Nothings. This is useful for representing stripping out values or failure.QTo be compactable alone, no laws must be satisfied other than the type signature.=If the data type is also a Functor the following should hold: Kleisli composition /fmapMaybe (l <=< r) = fmapMaybe l . fmapMaybe rFunctor identity 1 compact . fmap Just = idFunctor identity 2 fmapMaybe Just = idFunctor relation compact = fmapMaybe idAccording to Kmett, (Compactable f, Functor f) is a functor from the kleisli category of Maybe to the category of haskell data types. Kleisli Maybe -> Hask.?If the data type is also Applicative the following should hold: Applicative left identity compact . (pure Just <*>) = idApplicative right identity applyMaybe (pure Just) = idApplicative relation compact = applyMaybe (pure id);If the data type is also a Monad the following should hold: Monad left identity #flip bindMaybe (return . Just) = idMonad right identity "compact . (return . Just =<<) = idMonad relation compact = flip bindMaybe return?If the data type is also Alternative the following should hold: Alternative identity compact empty = emptyAlternative annihilation &compact (const Nothing <$> xs) = empty?If the data type is also Traversable the following should hold:  Traversable Applicative relation "traverseMaybe (pure . Just) = pureTraversable composition iCompose . fmap (traverseMaybe f) . traverseMaybe g = traverseMaybe (Compose . fmap (traverseMaybe f) . g)Traversable Functor relation *traverse f = traverseMaybe (fmap Just . f)Traversable naturality +t . traverseMaybe f = traverseMaybe (t . f)Separate and filtervhave recently elevated roles in this typeclass, and is not as well explored as compact. Here are the laws known today: Functor identity 3  fst . separate . fmap Right = idFunctor identity 4 snd . separate . fmap Left = idApplicative left identity 2 &snd . separate . (pure Right <*>) = idApplicative right identity 2 %fst . separate . (pure Left <*>) = idAlternative annihilation left *snd . separate . fmap (const Left) = emptyAlternative annihilation right +fst , separate . fmap (const Right) = empty`Docs for relationships between these functions and, a cleanup of laws will happen at some point.If you know of more useful laws, or have better names for the ones above (especially those marked "name me"). Please let me know.%qWhile more constrained, when available, this default is going to be faster than the one provided in the typeclass&qWhile more constrained, when available, this default is going to be faster than the one provided in the typeclass'   !"#$%&,   !"#$%&  FGH  I      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJJKL*compactable-0.1.1.1-JXivg8wJXru9g4zZgufB5CControl.Compactable CompactFold compactFold separateFoldfmapFold fmapBifold applyFold applyBifoldbindFold bindBifold traverseFoldtraverseBifold Compactablecompactseparatefilter fmapMaybe fmapEither applyMaybe applyEither bindMaybe bindEither traverseMaybetraverseEithermfold'mleftsmrights fforMaybefforFold fforEither fforBifold fmapMaybeM fforMaybeM fmapEitherM fforEitherM applyMaybeM bindMaybeMtraverseMaybeMaltDefaultCompactaltDefaultSeparate$fCompactableSet$fCompactableConst$fCompactableVector$fCompactableSeq$fCompactableMap$fCompactableIntMap$fCompactableCompose$fCompactableProduct$fCompactableReadPrec$fCompactableReadP$fCompactableOption$fCompactableProxy$fCompactableSTM$fCompactableIO$fCompactable[]$fCompactableEither$fCompactableMaybe$fMonoidMonadSum$fCompactFoldArrowMonad$fCompactFoldSTM$fCompactFoldReadPrec$fCompactFoldReadP$fCompactFoldMaybe$fCompactFold[]$fCompactableArrowMonad$fFunctorMonadSum$fApplicativeMonadSum$fAlternativeMonadSum$fMonadMonadSum$fMonadPlusMonadSumbase Data.FoldableFoldableMonadSum unMonadSum