osc copypac from project:devel:languages:haskell:ghc-9.10.x package:ghc-semigroupoids revision:3, using keep-link

OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-semigroupoids?expand=0&rev=86
This commit is contained in:
Peter Simons 2025-03-05 22:00:56 +00:00 committed by Git OBS Bridge
commit a9b92b444e
6 changed files with 748 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

362
ghc-semigroupoids.changes Normal file
View File

@ -0,0 +1,362 @@
-------------------------------------------------------------------
Sun Mar 2 14:25:49 UTC 2025 - Peter Simons <psimons@suse.com>
- Update semigroupoids to version 6.0.1 revision 2.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Fri Jul 5 12:13:56 UTC 2024 - Peter Simons <psimons@suse.com>
- Update semigroupoids to version 6.0.1 revision 1.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Sat May 4 15:38:56 UTC 2024 - Peter Simons <psimons@suse.com>
- Update semigroupoids to version 6.0.1.
6.0.1 [2024.05.04]
------------------
* Fix a build error when compiling with `-f-contravariant`.
-------------------------------------------------------------------
Sat Sep 30 12:41:14 UTC 2023 - Peter Simons <psimons@suse.com>
- Update semigroupoids to version 6.0.0.1 revision 1.
6.0.0.1 [2023.03.16]
--------------------
* When building with GHC 9.6, require `transformers >= 0.6.1` and
`containers >= 0.6.7`. This ensures that `semigroupoids` always provides
`Traversable1` instances for data types from `transformers` and `containers`
unconditionally.
6 [2023.03.12]
--------------
* Drop support for GHC 7.10 and earlier.
* The `Foldable1` and `Bifoldable1` classes have been migrated:
* When building with `base-4.18` or later, `semigroupoids` re-exports
`Foldable1` and `Bifoldable1` from `base`. (These classes were added to
`base-4.18` as a result of
[this Core Libraries proposal](haskell/core-libraries-committee#9).)
* When building with older versions of `base`, `semigroupoids` re-exports
`Foldable1` and `Bifoldable1` from the
[`foldable1-classes-compat`](https://github.com/haskell-compat/foldable1-classes-compat)
compatibility package.
Note that the version of `Foldable1` that `semigroupoids` defined in previous
releases only had three class methods: `fold1`, `foldMap1`, and `toNonEmpty`.
Moreover, `foldMap1` had a default implementation in terms of a `Foldable`
constraint. `base`'s version of `Foldable1`, however, has some notable
differences:
1. It has many more methods than the three listed above, such as the
`foldrMap1` method.
2. `foldMap1` now has a default implementation in terms of `foldrMap1` instead
of in terms of a `Foldable` constraint.
To avoid (1) causing issues when upgrading to `semigroupoids-6`,
`Data.Semigroup.Foldable` only re-exports the `fold1`, `foldMap1`, and
`toNonEmpty` methods, which reflects the API in previous `semigroupoids`
releases. If you want to use the other, new class methods of `Foldable1`,
consider importing it from `Data.Foldable1` (its home in `base`) instead.
Difference (2) is trickier, because it is possible that existing code that
defines valid `Foldable1` instances will need to be migrated. If you have an
instance like this:
```hs
import Data.Semigroup.Foldable
data T a = MkT a
instance Foldable T where
foldMap f (MkT x) = f x
instance Foldable1 T -- Relying on Foldable-based defaults
```
Then calling `foldMap1` on `T` will throw an error with `semigroupoids-6`, as
`foldMap1`'s default implementation no longer uses `Foldable`. To migrate this
code, change the instance to explicitly define `foldMap1`:
```hs
instance Foldable1 T where
foldMap1 f (MkT x) = f x
```
This approach should be backwards-compatible with previous `semigroupoids`
releases.
Some other side effects of this migration include:
* The `Data.Semigroup.Foldable.Class` module has been deprecated. It no
longer serves a useful role, as it simply re-exports a limited subset of
the `Data.Foldable1` and `Data.Bifoldable1` API.
* All of the `Foldable1` and `Bifoldable1` instances that were previously
defined in `semigroupoids` have now been migrated to downstream libraries
(`base`, `bifunctors`, `containers`, `tagged`, and `transformers`), so it
is no longer strictly necessary to depend on `semigroupoids` to make use of
these instances.
* Add `Generic1`-based functions for many classes, useful for writing instances:
- `Data.Functor.Alt.(<!>)` -> `Data.Functor.Alt.galt`
- `Data.Functor.Apply.{liftF2,liftF3}` -> `Data.Functor.Apply.{gliftF2,gliftF3}`
- `Data.Functor.Bind.(>>-)` -> `Data.Functor.Bind.gbind`
- `Data.Functor.Contravariant.Conclude.{conclude,concluded}` -> `Data.Functor.Contravariant.Conclude.{gconclude,gconcluded}`
- `Data.Functor.Contravariant.Decide.{decide,decided}` -> `Data.Functor.Contravariant.Decide.{gdecide,gdecided}`
- `Data.Functor.Contravariant.Divise.{divise,divised}` -> `Data.Functor.Contravariant.Divise.{gdivise,gdivised}`
- `Data.Functor.Extend.{duplicated,extended}` -> `Data.Functor.Extend.{gduplicated,gextended}`
- `Data.Functor.Plus.zero` -> `Data.Functor.Plus.gzero`
- `Data.Semigroup.Foldable.{fold1,foldMap1,toNonEmpty}` -> `Data.Semigroup.Foldable.{gfold1,gfoldMap1,gtoNonEmpty}`
- `Data.Semigroup.Traversable.{traverse1,sequence1}` -> `Data.Semigroup.Traversable.{gtraverse1,gsequence1}`
-------------------------------------------------------------------
Thu Mar 30 17:08:11 UTC 2023 - Peter Simons <psimons@suse.com>
- Updated spec file to conform with ghc-rpm-macros-2.5.2.
-------------------------------------------------------------------
Thu Feb 2 15:17:08 UTC 2023 - Peter Simons <psimons@suse.com>
- Update semigroupoids to version 5.3.7 revision 1.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Mon Jan 10 00:07:09 UTC 2022 - Peter Simons <psimons@suse.com>
- Update semigroupoids to version 5.3.7.
5.3.7 [2022.01.09]
------------------
* Relax the `Bind` constraints in the following instances to `Functor`:
```diff
-instance (Bind f, Monad f) => Alt (MaybeT f)
-instance (Bind f, Monad f) => Plus (MaybeT f)
+instance (Functor f, Monad f) => Alt (MaybeT f)
+instance (Functor f, Monad f) => Plus (MaybeT f)
-instance (Bind f, Monad f, Semigroup e) => Alt (ExceptT e f)
-instance (Bind f, Monad f, Semigroup e, Monoid e) => Plus (ExceptT e f)
+instance (Functor f, Monad f, Semigroup e) => Alt (ExceptT e f)
+instance (Functor f, Monad f, Semigroup e, Monoid e) => Plus (ExceptT e f)
-- If building with transformers-0.5.* or older
-instance (Bind f, Monad f) => Alt (ErrorT e f)
-instance (Bind f, Monad f, Error e) => Plus (ErrorT e f
+instance (Functor f, Monad f) => Alt (ErrorT e f)
+instance (Functor f, Monad f, Error e) => Plus (ErrorT e f)
```
-------------------------------------------------------------------
Wed Nov 10 10:04:07 UTC 2021 - psimons@suse.com
- Update semigroupoids to version 5.3.6 revision 2.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Sun Oct 10 14:17:19 UTC 2021 - psimons@suse.com
- Update semigroupoids to version 5.3.6 revision 1.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Fri Oct 8 07:18:53 UTC 2021 - psimons@suse.com
- Update semigroupoids to version 5.3.6.
5.3.6 [2021.10.07]
------------------
* Allow building with GHC 9.2.
* Allow building with `transformers-0.6.*`.
* Add `Alt` instance for `Identity`.
* Add `Conclude`, `Decide` and `Divise` type classes and instances.
* Add `(<.*>)`, `(<*.>)`, and `traverseMaybe` functions, which make it easier
to defined `Traversable1` instances for data types that have fields with a
combination of `Traversable` and `Traversable1` instances.
* Add `Semigroupoids.Do` module with overloads for use with `QualifiedDo`.
* Add `Apply`, `Alt`, `Plus`, `Bind` and `BindTrans` instances for the CPS
versions of `WriterT` and `RWST`.
* Add `psum` function to `Data.Functor.Plus`.
* Add `Categorical` data type.
-------------------------------------------------------------------
Tue Jul 27 07:51:53 UTC 2021 - psimons@suse.com
- Update semigroupoids to version 5.3.5 revision 1.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Mon Jan 4 11:48:22 UTC 2021 - psimons@suse.com
- Update semigroupoids to version 5.3.5.
5.3.5 [2020.12.31]
------------------
* The build-type has been changed from `Custom` to `Simple`.
To achieve this, the `doctests` test suite has been removed in favor of using
[`cabal-docspec`](https://github.com/phadej/cabal-extras/tree/master/cabal-docspec)
to run the doctests.
* Explicitly mark modules as `Safe`.
-------------------------------------------------------------------
Thu Dec 17 12:20:00 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
- disable %{ix86} build
-------------------------------------------------------------------
Tue Oct 6 08:56:50 UTC 2020 - psimons@suse.com
- Update semigroupoids to version 5.3.4 revision 2.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Mon Aug 31 09:34:34 UTC 2020 - psimons@suse.com
- Update semigroupoids to version 5.3.4 revision 1.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Tue Aug 18 10:45:58 UTC 2020 - Peter Simons <psimons@suse.com>
- Replace %setup -q with the more modern %autosetup macro.
-------------------------------------------------------------------
Tue Jun 16 11:14:34 UTC 2020 - Peter Simons <psimons@suse.com>
- Re-generate file with latest version of spec-cleaner.
-------------------------------------------------------------------
Wed Nov 27 03:01:07 UTC 2019 - psimons@suse.com
- Update semigroupoids to version 5.3.4.
5.3.4 [2019.11.26]
------------------
* Achieve forward compatibility with
[GHC proposal 229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst).
-------------------------------------------------------------------
Fri Nov 8 16:14:42 UTC 2019 - Peter Simons <psimons@suse.com>
- Drop obsolete group attributes.
-------------------------------------------------------------------
Wed Aug 28 02:02:29 UTC 2019 - psimons@suse.com
- Update semigroupoids to version 5.3.3.
5.3.3 [2019.08.27]
------------------
* Add `Alt` and `Plus` instances for `HashMap` from the `unordered-containers`
package.
-------------------------------------------------------------------
Tue Jun 11 14:29:16 UTC 2019 - Peter Simons <psimons@suse.com>
- Update Cabal file for more accurate build dependencies.
-------------------------------------------------------------------
Sat Jan 5 03:01:15 UTC 2019 - psimons@suse.com
- Update semigroupoids to version 5.3.2.
5.3.2 [2019.01.04]
------------------
* Bump the lower bound on `semigroups` to 0.16.2, and avoid incurring
the dependency entirely on recent GHCs.
* Fix the build on GHC 7.0 and 7.2.
-------------------------------------------------------------------
Sat Oct 20 11:31:58 UTC 2018 - Peter Simons <psimons@suse.com>
- Use https URL to refer to bugs.opensuse.org.
-------------------------------------------------------------------
Wed Jul 18 14:26:40 UTC 2018 - psimons@suse.com
- Cosmetic: replace tabs with blanks, strip trailing white space,
and update copyright headers with spec-cleaner.
-------------------------------------------------------------------
Fri Jul 13 14:32:00 UTC 2018 - psimons@suse.com
- Update semigroupoids to version 5.3.1.
* Fix a regression introduced in `semigroupoids-5.3` in which some modules
regressed from `Trustworthy` to `Unsafe`.
* Allow building with `containers-0.6`.
* Add `Alt` instances for `First` and `Last` from `Data.Semigroup`, and
`Alt` and `Plus` instances for `First` and `Last` from `Data.Monoid`.
* Add missing `Apply`, `Bind`, `Extend`, `Foldable1` and `Traversable1`
instances for `Data.Semigroups`, `Data.Monoid` and `GHC.Generics`.
-------------------------------------------------------------------
Mon May 14 17:02:11 UTC 2018 - psimons@suse.com
- Update semigroupoids to version 5.2.2 revision 3.
* Add `optional` to `Data.Functor.Alt` (analogous to the `optional` function
in `Control.Applicative`)
* `liftF2` is now a class method of `Apply` (mirroring the fact that `liftA2`
is now a class method of `Applicative`). `liftF2` and `(<.>)` have default
definitions in terms of the other.
* Allow building with GHC 8.4
* `Apply` and `Bind` instances for `Q`, from the `template-haskell` package.
* Add instances for `(:~:)` and `(:~~:)` from `Data.Type.Equality`, and
`Coercion` from `Data.Type.Coercion`
* Add the `toNonEmpty` method to `Foldable1`. Add `foldrM1` and `foldlM1`
functions to `Data.Semigroup.Foldable` that are defined in terms of `toNonEmpty`.
* Add `Apply`, `Bind`, `Foldable1`, and `Traversable1` instances for `Complex`
* Add `Apply` and `Bind` instances for `HashMap` from the `unordered-containers` package
(on which `semigroupoids` now depends)
* Add `Semigroupoid` instances for `Tagged` and `Const`
-------------------------------------------------------------------
Thu Jul 27 14:03:56 UTC 2017 - psimons@suse.com
- Update to version 5.2.
-------------------------------------------------------------------
Thu Sep 15 07:10:53 UTC 2016 - psimons@suse.com
- Update to version 5.1 revision 0 with cabal2obs.
-------------------------------------------------------------------
Sun Jul 10 17:28:16 UTC 2016 - psimons@suse.com
- Update to version 5.0.1 revision 1 with cabal2obs.
-------------------------------------------------------------------
Mon Jan 18 11:49:27 UTC 2016 - mimi.vx@gmail.com
- update to 5.0.1
* transformers-compat 0.5 support
* Removed some redundant constraints.
-------------------------------------------------------------------
Sun Aug 23 17:39:53 UTC 2015 - mimi.vx@gmail.com
- update to 5.0.0.4
* doctest 0.10 support
-------------------------------------------------------------------
Thu Aug 13 16:09:42 UTC 2015 - mimi.vx@gmail.com
- update to 5.0.0.3
-------------------------------------------------------------------
Thu Aug 6 19:43:49 UTC 2015 - mimi.vx@gmail.com
- update to 5.0.0.2
* Added the CHANGELOG to the distribution so that hackage can link to it in the haddocks.
* Absorbed Data.Bifunctor.Apply, Data.Semigroup.Bifoldable and Data.Semigroup.Traversable
from bifunctors.
* This caused us to pick up a dependency on tagged.
* Exiled Data.Semifunctor.*, Data.Semigroupoid.Product and Data.Semigroupoid.Coproduct
to semigroupoid-extras.
* Set an explicit fixity for -<- and ->-.
* Major changes to the API to support PolyKinds and DataKinds. This necessarily shuts off GHC <= 7.4.
* Orphan instances have moved upstream into a common base-orphans package.
* Added asum1 to Data.Semigroup.Foldable.
* Support for 'ConstrainedClassMethods' is currently required for GHC HEAD.
-------------------------------------------------------------------
Wed May 27 10:00:37 UTC 2015 - mimi.vx@gmail.com
- correct license to BSD-2-Clause
-------------------------------------------------------------------
Sun Apr 26 17:05:36 UTC 2015 - mimi.vx@gmail.com
- initial commit

152
ghc-semigroupoids.spec Normal file
View File

@ -0,0 +1,152 @@
#
# spec file for package ghc-semigroupoids
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global pkg_name semigroupoids
%global pkgver %{pkg_name}-%{version}
Name: ghc-%{pkg_name}
Version: 6.0.1
Release: 0
Summary: Semigroupoids: Category sans id
License: BSD-2-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-base-devel
BuildRequires: ghc-base-orphans-devel
BuildRequires: ghc-base-orphans-prof
BuildRequires: ghc-base-prof
BuildRequires: ghc-bifunctors-devel
BuildRequires: ghc-bifunctors-prof
BuildRequires: ghc-comonad-devel
BuildRequires: ghc-comonad-prof
BuildRequires: ghc-containers-devel
BuildRequires: ghc-containers-prof
BuildRequires: ghc-contravariant-devel
BuildRequires: ghc-contravariant-prof
BuildRequires: ghc-distributive-devel
BuildRequires: ghc-distributive-prof
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-hashable-prof
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-tagged-devel
BuildRequires: ghc-tagged-prof
BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-template-haskell-prof
BuildRequires: ghc-transformers-compat-devel
BuildRequires: ghc-transformers-compat-prof
BuildRequires: ghc-transformers-devel
BuildRequires: ghc-transformers-prof
BuildRequires: ghc-unordered-containers-devel
BuildRequires: ghc-unordered-containers-prof
ExcludeArch: %{ix86}
%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.
<<https://raw.githubusercontent.com/ekmett/semigroupoids/master/img/classes.svg
Relationships among type classes from this package and others>>
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.
%package devel
Summary: Haskell %{pkg_name} library development files
Requires: %{name} = %{version}-%{release}
Requires: ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
%description devel
This package provides the Haskell %{pkg_name} library development files.
%package -n ghc-%{pkg_name}-doc
Summary: Haskell %{pkg_name} library documentation
Requires: ghc-filesystem
BuildArch: noarch
%description -n ghc-%{pkg_name}-doc
This package provides the Haskell %{pkg_name} library documentation.
%package -n ghc-%{pkg_name}-prof
Summary: Haskell %{pkg_name} profiling library
Requires: ghc-%{pkg_name}-devel = %{version}-%{release}
Supplements: (ghc-%{pkg_name}-devel and ghc-prof)
%description -n ghc-%{pkg_name}-prof
This package provides the Haskell %{pkg_name} profiling library.
%prep
%autosetup -n %{pkg_name}-%{version}
cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
%install
%ghc_lib_install
%post devel
%ghc_pkg_recache
%postun devel
%ghc_pkg_recache
%files -f %{name}.files
%license LICENSE
%files devel -f %{name}-devel.files
%doc CHANGELOG.markdown README.markdown
%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
%license LICENSE
%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
%changelog

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1d532030862414f5d4f2f6f001783f77aa14e5f05ee8e3c4a2d2129fca29cc1f
size 36372

207
semigroupoids.cabal Normal file
View File

@ -0,0 +1,207 @@
cabal-version: 1.24
name: semigroupoids
category: Control, Comonads
version: 6.0.1
x-revision: 2
license: BSD2
license-file: LICENSE
author: Edward A. Kmett
maintainer: Edward A. Kmett <ekmett@gmail.com>
stability: provisional
homepage: http://github.com/ekmett/semigroupoids
bug-reports: http://github.com/ekmett/semigroupoids/issues
copyright: Copyright (C) 2011-2015 Edward A. Kmett
tested-with: GHC == 8.0.2
, GHC == 8.2.2
, GHC == 8.4.4
, GHC == 8.6.5
, GHC == 8.8.4
, GHC == 8.10.7
, GHC == 9.0.2
, GHC == 9.2.7
, GHC == 9.4.4
, GHC == 9.6.1
build-type: Simple
synopsis: Semigroupoids: Category sans id
extra-source-files:
.gitignore
.vim.custom
README.markdown
CHANGELOG.markdown
img/classes.dot
extra-doc-files:
img/classes.svg
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.
.
<<https://raw.githubusercontent.com/ekmett/semigroupoids/master/img/classes.svg Relationships among type classes from this package and others>>
.
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.
source-repository head
type: git
location: git://github.com/ekmett/semigroupoids.git
flag containers
description:
You can disable the use of the `containers` package using `-f-containers`.
.
Disabing this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
default: True
manual: True
flag contravariant
description:
You can disable the use of the `contravariant` package using `-f-contravariant`.
.
Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
.
If disabled we will not supply instances of `Contravariant`
.
default: True
manual: True
flag distributive
description:
You can disable the use of the `distributive` package using `-f-distributive`.
.
Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
.
If disabled we will not supply instances of `Distributive`
.
default: True
manual: True
flag comonad
description:
You can disable the use of the `comonad` package using `-f-comonad`.
.
Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
.
If disabled we will not supply instances of `Comonad`
.
default: True
manual: True
flag tagged
description:
You can disable the use of the `tagged` package using `-f-tagged`.
.
Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
default: True
manual: True
flag unordered-containers
description:
You can disable the use of the `unordered-containers` package (and also its dependency `hashable`) using `-f-unordered-containers`.
.
Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
default: True
manual: True
library
build-depends:
base >= 4.9 && < 5,
base-orphans >= 0.8.4 && < 1,
bifunctors >= 5.6 && < 6,
template-haskell >= 0.2.11,
transformers >= 0.5 && < 0.7,
transformers-compat >= 0.6 && < 0.8
if !impl(ghc >= 9.6)
build-depends: foldable1-classes-compat >= 0.1 && < 0.2
-- On GHC-9.6&base-4.18 we require recent enough transformers and containers
-- with Foldable1 instances.
if impl(ghc >= 9.6)
build-depends: transformers >= 0.6.1.0
if flag(containers)
build-depends: containers >= 0.6.7
if flag(containers)
build-depends: containers >= 0.5.7.1 && < 0.9
if flag(contravariant)
build-depends: contravariant >= 1.5.3 && < 2
if flag(distributive)
build-depends: distributive >= 0.5.2 && < 1
if flag(comonad)
build-depends: comonad >= 5.0.8 && < 6
if flag(tagged)
build-depends: tagged >= 0.8.7 && < 1
if flag(unordered-containers)
build-depends: hashable >= 1.2.7.0 && < 1.6,
unordered-containers >= 0.2.8.0 && < 0.3
hs-source-dirs: src
exposed-modules:
Data.Bifunctor.Apply
Data.Functor.Alt
Data.Functor.Apply
Data.Functor.Bind
Data.Functor.Bind.Class
Data.Functor.Bind.Trans
Data.Functor.Extend
Data.Functor.Plus
Data.Groupoid
Data.Isomorphism
Data.Semigroup.Bifoldable
Data.Semigroup.Bitraversable
Data.Semigroup.Foldable
Data.Semigroup.Foldable.Class
Data.Semigroup.Traversable
Data.Semigroup.Traversable.Class
Data.Semigroupoid
Data.Semigroupoid.Categorical
Data.Semigroupoid.Dual
Data.Semigroupoid.Ob
Data.Semigroupoid.Static
Data.Traversable.Instances
Semigroupoids.Do
other-modules:
Semigroupoids.Internal
if impl(ghc >= 8.6) || flag(contravariant)
exposed-modules:
Data.Functor.Contravariant.Conclude
Data.Functor.Contravariant.Decide
Data.Functor.Contravariant.Divise
ghc-options: -Wall -Wno-warnings-deprecations -Wno-trustworthy-safe
if impl(ghc >= 9.0)
-- these flags may abort compilation with GHC-8.10
-- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295
ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode
default-language: Haskell2010