Package6.0.1ControlComonads
semigroupoids
Semigroupoids: Category sans id
- Version6.0.1
- CategoryControl, Comonads
- LicenceBSD-2-Clause
- AuthorEdward A. Kmett
- MaintainerEdward A. Kmett <ekmett@gmail.com>
- Homepagegithub.com/ekmett/semigroupoids
- Pinned byhackage semigroupoids 6.0.1
- Sourcehackage.haskell.org/package/semigroupoids-6.0.1
Modules
26 modules- Data.Bifunctor.Apply6
- Data.Functor.Alt3
- Data.Functor.Apply12
- Data.Functor.Bind15
- Data.Functor.Bind.Trans1
- Data.Functor.Contravariant.Conclude4This module is only available if building with GHC 8.6 or later, or if the
- Data.Functor.Contravariant.Decide4This module is only available if building with GHC 8.6 or later, or if the
- Data.Functor.Contravariant.Divise5This module is only available if building with GHC 8.6 or later, or if the
- Data.Functor.Extend3
- Data.Functor.Plus3
- Data.Groupoid1
- Data.Isomorphism1
- Data.Semigroup.Bifoldable5Re-exports a subset of the Data.Bifoldable1 module along with some
- Data.Semigroup.Bitraversable2
- Data.Semigroup.Foldable13Re-exports a subset of the Data.Foldable1 module along with some additional
- Data.Semigroup.Foldable.Class2
- Data.Semigroup.Traversable5
- Data.Semigroup.Traversable.Class2
- Data.Semigroupoid3A semigroupoid satisfies all of the requirements to be a Category except
- Data.Semigroupoid.Categorical2Provides a way to attach an identity to any semigroupoid.
- Data.Semigroupoid.Dual1A semigroupoid satisfies all of the requirements to be a Category except
- Data.Semigroupoid.Ob1
- Data.Semigroupoid.Static1
- Data.Traversable.Instances0Re-exports from the `base-orphans` and `transformers-compat` packages.
- Semigroupoids.Do10This module re-exports operators from Data.Functor.Apply and
Internal modules · 1
- Data.Functor.Bind.Class10This module is used to resolve the cyclic we get from defining these
Description
Provides a wide array of (semi)groupoids and operations for working with them.
A Semigroupoid is a Category without the requirement of identity arrows for every object in the category.
A Category is any Semigroupoid for which the Yoneda lemma holds.
When working with comonads you often have the <*> portion of an Applicative, but not the pure. This was captured in Uustalu and Vene's "Essence of Dataflow Programming" in the form of the ComonadZip class in the days before Applicative. Apply provides a weaker invariant, but for the comonads used for data flow programming (found in the streams package), this invariant is preserved. Applicative function composition forms a semigroupoid.
Similarly many structures are nearly a comonad, but not quite, for instance lists provide a reasonable extend operation in the form of tails, but do not always contain a value.
We describe the relationships between the type classes defined in this package and those from base (and some from contravariant) in the diagram below. Thick-bordered nodes correspond to type classes defined in this package; thin-bordered ones correspond to type classes from elsewhere. Solid edges indicate a subclass relationship that actually exists; dashed edges indicate a subclass relationship that should exist, but currently doesn't.
Apply, Bind, and Extend (not shown) give rise the Static, Kleisli and Cokleisli semigroupoids respectively.
This lets us remove many of the restrictions from various monad transformers as in many cases the binding operation or <*> operation does not require them.
Finally, to work with these weaker structures it is beneficial to have containers that can provide stronger guarantees about their contents, so versions of Traversable and Foldable that can be folded with just a Semigroup are added.
Depends on
13 packages- base-4.20.2.0with GHC
- base-orphans-0.9.3in this set
- bifunctors-5.6.2in this set
- comonad-5.0.9in this set
- containers-0.7with GHC
- contravariant-1.5.5in this set
- distributive-0.6.2.1in this set
- hashable-1.4.7.0in this set
- tagged-0.8.9in this set
- template-haskell-2.22.0.0with GHC
- transformers-0.6.1.1with GHC
- transformers-compat-0.7.2in this set
- unordered-containers-0.2.21in this set
Used by in this set · 22
- active-0.2.1
- adjunctions-4.4.3
- checkers-0.6.0
- either-5.0.3
- foldl-1.4.18
- free-5.2
- insert-ordered-containers-0.2.6
- kan-extensions-5.2.7
- keys-3.12.3
- lens-5.3.5
- linear-1.22
- monoid-extras-0.6.2
- pointed-5.0.4
- quickcheck-classes-0.6.5.0
- rebase-1.21.2
- reducers-3.12.5
- semialign-1.3.1
- servant-client-0.20.2
- strict-list-0.1.7.5
- validation-1.1.3
- vec-0.5.1
- vector-instances-3.4.2