semigroupoids 5.3.4 → 5.3.5
raw patch · 24 files changed
+120/−307 lines, 24 filesdep −doctestdep −semigroupoidsdep ~basedep ~base-orphansdep ~bifunctorssetup-changed
Dependencies removed: doctest, semigroupoids
Dependency ranges changed: base, base-orphans, bifunctors, comonad, contravariant, distributive, generic-deriving, hashable, semigroups, tagged, template-haskell, transformers, transformers-compat, unordered-containers
Files
- .travis.yml +0/−178
- CHANGELOG.markdown +8/−0
- README.markdown +1/−1
- Setup.lhs +5/−32
- Warning.hs +0/−5
- semigroupoids.cabal +27/−42
- src/Data/Bifunctor/Apply.hs +5/−0
- src/Data/Functor/Alt.hs +1/−1
- src/Data/Functor/Apply.hs +1/−1
- src/Data/Functor/Bind.hs +1/−1
- src/Data/Functor/Bind/Class.hs +16/−16
- src/Data/Functor/Bind/Trans.hs +5/−0
- src/Data/Groupoid.hs +3/−1
- src/Data/Isomorphism.hs +5/−0
- src/Data/Semigroup/Bifoldable.hs +5/−0
- src/Data/Semigroup/Bitraversable.hs +5/−0
- src/Data/Semigroup/Foldable.hs +9/−2
- src/Data/Semigroup/Traversable.hs +5/−0
- src/Data/Semigroupoid.hs +1/−1
- src/Data/Semigroupoid/Dual.hs +5/−0
- src/Data/Semigroupoid/Ob.hs +5/−0
- src/Data/Semigroupoid/Static.hs +1/−1
- src/Data/Traversable/Instances.hs +6/−0
- test/doctests.hs +0/−25
− .travis.yml
@@ -1,178 +0,0 @@-# This Travis job script has been generated by a script via-#-# haskell-ci '--output=.travis.yml' '--config=cabal.haskell-ci' 'cabal.project'-#-# For more information, see https://github.com/haskell-CI/haskell-ci-#-# version: 0.5.20180830-#-language: c-dist: xenial-git:- # whether to recursively clone submodules- submodules: false-notifications:- irc:- channels:- - irc.freenode.org#haskell-lens- skip_join: true- template:- - "\"\\x0313semigroupoids\\x03/\\x0306%{branch}\\x03 \\x0314%{commit}\\x03 %{build_url} %{message}\""-cache:- directories:- - $HOME/.cabal/packages- - $HOME/.cabal/store-before_cache:- - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log- # remove files that are regenerated by 'cabal update'- - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*- - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json- - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache- - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar- - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx- - rm -rfv $CABALHOME/packages/head.hackage-matrix:- include:- - compiler: ghc-8.8.1- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}- - compiler: ghc-8.6.5- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-3.0"]}}- - compiler: ghc-8.4.4- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-3.0"]}}- - compiler: ghc-8.2.2- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-3.0"]}}- - compiler: ghc-8.0.2- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-3.0"]}}- - compiler: ghc-7.10.3- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.10.3","cabal-install-3.0"]}}- - compiler: ghc-7.8.4- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.4","cabal-install-3.0"]}}- - compiler: ghc-7.6.3- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.6.3","cabal-install-3.0"]}}- - compiler: ghc-7.4.2- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.4.2","cabal-install-3.0"]}}- - compiler: ghc-7.2.2- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.2.2","cabal-install-3.0"]}}- - compiler: ghc-7.0.4- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.0.4","cabal-install-3.0"]}}- - compiler: ghc-head- addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-head","cabal-install-head"]}}- allow_failures:- - compiler: ghc-head- - compiler: ghc-7.0.4- - compiler: ghc-7.2.2-before_install:- - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')- - WITHCOMPILER="-w $HC"- - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')- - HCPKG="$HC-pkg"- - unset CC- - CABAL=/opt/ghc/bin/cabal- - CABALHOME=$HOME/.cabal- - export PATH="$CABALHOME/bin:$PATH"- - TOP=$(pwd)- - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"- - echo $HCNUMVER- - CABAL="$CABAL -vnormal+nowrap+markoutput"- - set -o pipefail- - |- echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk- echo 'BEGIN { state = "output"; }' >> .colorful.awk- echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk- echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk- echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk- echo ' if (state == "cabal") {' >> .colorful.awk- echo ' print blue($0)' >> .colorful.awk- echo ' } else {' >> .colorful.awk- echo ' print $0' >> .colorful.awk- echo ' }' >> .colorful.awk- echo '}' >> .colorful.awk- - cat .colorful.awk- - |- color_cabal_output () {- awk -f $TOP/.colorful.awk- }- - echo text | color_cabal_output-install:- - ${CABAL} --version- - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"- - TEST=--enable-tests- - BENCH=--enable-benchmarks- - HEADHACKAGE=false- - if [ $HCNUMVER -gt 80801 ] ; then HEADHACKAGE=true ; fi- - rm -f $CABALHOME/config- - |- echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config- echo "remote-build-reporting: anonymous" >> $CABALHOME/config- echo "write-ghc-environment-files: always" >> $CABALHOME/config- echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config- echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config- echo "world-file: $CABALHOME/world" >> $CABALHOME/config- echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config- echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config- echo "installdir: $CABALHOME/bin" >> $CABALHOME/config- echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config- echo "store-dir: $CABALHOME/store" >> $CABALHOME/config- echo "install-dirs user" >> $CABALHOME/config- echo " prefix: $CABALHOME" >> $CABALHOME/config- echo "repository hackage.haskell.org" >> $CABALHOME/config- echo " url: http://hackage.haskell.org/" >> $CABALHOME/config- - |- if $HEADHACKAGE; then- echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1/g')" >> $CABALHOME/config- echo "repository head.hackage.ghc.haskell.org" >> $CABALHOME/config- echo " url: https://ghc.gitlab.haskell.org/head.hackage/" >> $CABALHOME/config- echo " secure: True" >> $CABALHOME/config- echo " root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d" >> $CABALHOME/config- echo " 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329" >> $CABALHOME/config- echo " f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89" >> $CABALHOME/config- echo " key-threshold: 3" >> $CABALHOME/config- fi- - cat $CABALHOME/config- - rm -fv cabal.project cabal.project.local cabal.project.freeze- - travis_retry ${CABAL} v2-update -v- # Generate cabal.project- - rm -rf cabal.project cabal.project.local cabal.project.freeze- - touch cabal.project- - |- echo "packages: ." >> cabal.project- - |- - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(semigroupoids)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"- - cat cabal.project || true- - cat cabal.project.local || true- - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi- - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output- - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"- - rm cabal.project.freeze- - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output-script:- - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)- # Packaging...- - ${CABAL} v2-sdist all | color_cabal_output- # Unpacking...- - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/- - cd ${DISTDIR} || false- - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;- - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;- - PKGDIR_semigroupoids="$(find . -maxdepth 1 -type d -regex '.*/semigroupoids-[0-9.]*')"- # Generate cabal.project- - rm -rf cabal.project cabal.project.local cabal.project.freeze- - touch cabal.project- - |- echo "packages: ${PKGDIR_semigroupoids}" >> cabal.project- - |- - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(semigroupoids)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"- - cat cabal.project || true- - cat cabal.project.local || true- # Building with tests and benchmarks...- # build & run tests, build benchmarks- - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output- # Testing...- - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output- # cabal check...- - (cd ${PKGDIR_semigroupoids} && ${CABAL} -vnormal check)- # haddock...- - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output--# REGENDATA ["--output=.travis.yml","--config=cabal.haskell-ci","cabal.project"]-# EOF
CHANGELOG.markdown view
@@ -1,3 +1,11 @@+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`.+ 5.3.4 [2019.11.26] ------------------ * Achieve forward compatibility with
README.markdown view
@@ -1,7 +1,7 @@ semigroupoids ========== -[](https://hackage.haskell.org/package/semigroupoids) [](http://travis-ci.org/ekmett/semigroupoids)+[](https://hackage.haskell.org/package/semigroupoids) [](https://github.com/ekmett/semigroupoids/actions?query=workflow%3AHaskell-CI) A semigroupoid is a `Category` without `id`.
Setup.lhs view
@@ -1,34 +1,7 @@-\begin{code}-{-# LANGUAGE CPP #-}-{-# OPTIONS_GHC -Wall #-}-module Main (main) where--#ifndef MIN_VERSION_cabal_doctest-#define MIN_VERSION_cabal_doctest(x,y,z) 0-#endif--#if MIN_VERSION_cabal_doctest(1,0,0)--import Distribution.Extra.Doctest ( defaultMainWithDoctests )-main :: IO ()-main = defaultMainWithDoctests "doctests"--#else--#ifdef MIN_VERSION_Cabal--- If the macro is defined, we have new cabal-install,--- but for some reason we don't have cabal-doctest in package-db------ Probably we are running cabal sdist, when otherwise using new-build--- workflow-import Warning ()-#endif--import Distribution.Simple--main :: IO ()-main = defaultMain+#!/usr/bin/runhaskell+> module Main (main) where -#endif+> import Distribution.Simple -\end{code}+> main :: IO ()+> main = defaultMain
− Warning.hs
@@ -1,5 +0,0 @@-module Warning- {-# WARNING ["You are configuring this package without cabal-doctest installed.",- "The doctests test-suite will not work as a result.",- "To fix this, install cabal-doctest before configuring."] #-}- () where
semigroupoids.cabal view
@@ -1,8 +1,8 @@ name: semigroupoids category: Control, Comonads-version: 5.3.4+version: 5.3.5 license: BSD3-cabal-version: >= 1.8+cabal-version: >= 1.10 license-file: LICENSE author: Edward A. Kmett maintainer: Edward A. Kmett <ekmett@gmail.com>@@ -20,16 +20,16 @@ , GHC == 8.2.2 , GHC == 8.4.4 , GHC == 8.6.5- , GHC == 8.8.1-build-type: Custom+ , GHC == 8.8.3+ , GHC == 8.10.1+build-type: Simple synopsis: Semigroupoids: Category sans id extra-source-files:- .travis.yml .gitignore .vim.custom README.markdown CHANGELOG.markdown- Warning.hs+ description: Provides a wide array of (semi)groupoids and operations for working with them. .@@ -67,12 +67,6 @@ type: git location: git://github.com/ekmett/semigroupoids.git -custom-setup- setup-depends:- base >= 4 && < 5,- Cabal,- cabal-doctest >= 1 && < 1.1- flag containers description: You can disable the use of the `containers` package using `-f-containers`.@@ -103,12 +97,6 @@ default: True manual: True -flag doctests- description:- You can disable testing with doctests using `-f-doctests`.- default: True- manual: True- flag comonad description: You can disable the use of the `comonad` package using `-f-comonad`.@@ -139,39 +127,43 @@ library build-depends: base >= 4.3 && < 5,- base-orphans >= 0.8 && < 1,- bifunctors >= 5 && < 6,- template-haskell,- transformers >= 0.2 && < 0.6,+ base-orphans >= 0.8.4 && < 1,+ bifunctors >= 5.5.9 && < 6,+ template-haskell >= 0.2.5.0,+ transformers >= 0.3 && < 0.6, transformers-compat >= 0.5 && < 0.7 if impl(ghc >= 7.0 && < 7.2)- build-depends: generic-deriving >= 1.11 && < 1.14+ build-depends: generic-deriving >= 1.14 && < 1.15 if impl(ghc >= 7.2 && < 7.6) build-depends: ghc-prim if !impl(ghc >= 8.0)- build-depends: semigroups >= 0.16.2 && < 1+ build-depends: semigroups >= 0.18.5 && < 1 if flag(containers) build-depends: containers >= 0.3 && < 0.7 if flag(contravariant)- build-depends: contravariant >= 0.2.0.1 && < 2+ build-depends: contravariant >= 1.5.3 && < 2 if flag(distributive)- build-depends: distributive >= 0.2.2 && < 1+ build-depends: distributive >= 0.5.2 && < 1 if flag(comonad)- build-depends: comonad >= 4.2.6 && < 6+ build-depends: comonad >= 5.0.8 && < 6 if flag(tagged)- build-depends: tagged >= 0.8.5 && < 1+ build-depends: tagged >= 0.8.6.1 && < 1 if flag(unordered-containers)- build-depends: hashable >= 1.1 && < 1.4,- unordered-containers >= 0.2 && < 0.3+ if impl(ghc >= 7.4)+ build-depends: hashable >= 1.2.7.0 && < 1.4,+ unordered-containers >= 0.2.8.0 && < 0.3+ else+ build-depends: hashable >= 1.2.5.0 && < 1.4,+ unordered-containers >= 0.2.8.0 && < 0.3 hs-source-dirs: src @@ -203,16 +195,9 @@ if impl(ghc >= 7.10) ghc-options: -fno-warn-trustworthy-safe -test-suite doctests- type: exitcode-stdio-1.0- main-is: doctests.hs- hs-source-dirs: test- ghc-options: -Wall -fno-warn-warnings-deprecations+ 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 - if !flag(doctests)- buildable: False- else- build-depends:- base >= 4 && < 5,- doctest >= 0.11.1 && < 0.17,- semigroupoids+ default-language: Haskell2010
src/Data/Bifunctor/Apply.hs view
@@ -1,4 +1,9 @@ {-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett
src/Data/Functor/Alt.hs view
@@ -103,7 +103,7 @@ -- -- > <.> right-distributes over <!>: (a <!> b) <.> c = (a <.> c) <!> (b <.> c) ----- But 'Maybe', 'IO', @'Either' a@, @'ErrorT' e m@, and 'STM' satisfy the alternative+-- But 'Maybe', 'IO', @'Either' a@, @'ErrorT' e m@, and 'GHC.Conc.STM' satisfy the alternative -- \"left catch\" law instead: -- -- > pure a <!> b = pure a
src/Data/Functor/Apply.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE CPP #-} -#if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL <= 706 && defined(MIN_VERSION_comonad) && !(MIN_VERSION_comonad(3,0,3))+#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif -----------------------------------------------------------------------------
src/Data/Functor/Bind.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE CPP #-} -#if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL <= 706 && defined(MIN_VERSION_comonad) && !(MIN_VERSION_comonad(3,0,3))+#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif
src/Data/Functor/Bind/Class.hs view
@@ -201,7 +201,7 @@ instance (Apply f, Apply g) => Apply (Compose f g) where Compose f <.> Compose x = Compose ((<.>) <$> f <.> x) --- | A 'Constant f' is not 'Applicative' unless its 'f' is a 'Monoid', but it is an instance of 'Apply'+-- | A @'Constant' f@ is not 'Applicative' unless its @f@ is a 'Monoid', but it is an instance of 'Apply' instance Semigroup f => Apply (Constant f) where Constant a <.> Constant b = Constant (a <> b) Constant a <. Constant b = Constant (a <> b)@@ -219,7 +219,7 @@ instance Apply f => Apply (Reverse f) where Reverse a <.> Reverse b = Reverse (a <.> b) --- | A '(,) m' is not 'Applicative' unless its 'm' is a 'Monoid', but it is an instance of 'Apply'+-- | A @'(,)' m@ is not 'Applicative' unless its @m@ is a 'Monoid', but it is an instance of 'Apply' instance Semigroup m => Apply ((,)m) where (m, f) <.> (n, a) = (m <> n, f a) (m, a) <. (n, _) = (m <> n, a)@@ -241,7 +241,7 @@ Right _ .> Left a = Left a Right _ .> Right b = Right b --- | A 'Const m' is not 'Applicative' unless its 'm' is a 'Monoid', but it is an instance of 'Apply'+-- | A @'Const' m@ is not 'Applicative' unless its @m@ is a 'Monoid', but it is an instance of 'Apply' instance Semigroup m => Apply (Const m) where Const m <.> Const n = Const (m <> n) Const m <. Const n = Const (m <> n)@@ -351,12 +351,12 @@ ListT f <.> ListT a = ListT $ (<.>) <$> f <.> a -- unfortunately, WriterT has its wrapped product in the wrong order to just use (<.>) instead of flap--- | A 'WriterT w m' is not 'Applicative' unless its 'w' is a 'Monoid', but it is an instance of 'Apply'+-- | A @'Strict.WriterT' w m@ is not 'Applicative' unless its @w@ is a 'Monoid', but it is an instance of 'Apply' instance (Apply m, Semigroup w) => Apply (Strict.WriterT w m) where Strict.WriterT f <.> Strict.WriterT a = Strict.WriterT $ flap <$> f <.> a where flap (x,m) (y,n) = (x y, m <> n) --- | A 'WriterT w m' is not 'Applicative' unless its 'w' is a 'Monoid', but it is an instance of 'Apply'+-- | A @'Lazy.WriterT' w m@ is not 'Applicative' unless its @w@ is a 'Monoid', but it is an instance of 'Apply' instance (Apply m, Semigroup w) => Apply (Lazy.WriterT w m) where Lazy.WriterT f <.> Lazy.WriterT a = Lazy.WriterT $ flap <$> f <.> a where flap ~(x,m) ~(y,n) = (x y, m <> n)@@ -367,11 +367,11 @@ instance Bind m => Apply (Lazy.StateT s m) where (<.>) = apDefault --- | An 'RWST r w s m' is not 'Applicative' unless its 'w' is a 'Monoid', but it is an instance of 'Apply'+-- | An @'Strict.RWST' r w s m@ is not 'Applicative' unless its @w@ is a 'Monoid', but it is an instance of 'Apply' instance (Bind m, Semigroup w) => Apply (Strict.RWST r w s m) where (<.>) = apDefault --- | An 'RWST r w s m' is not 'Applicative' unless its 'w' is a 'Monoid', but it is an instance of 'Apply'+-- | An @'Lazy.RWST' r w s m@ is not 'Applicative' unless its @w@ is a 'Monoid', but it is an instance of 'Apply' instance (Bind m, Semigroup w) => Apply (Lazy.RWST r w s m) where (<.>) = apDefault @@ -379,11 +379,11 @@ ContT f <.> ContT v = ContT $ \k -> f $ \g -> v (k . g) #ifdef MIN_VERSION_comonad--- | An 'EnvT e w' is not 'Applicative' unless its 'e' is a 'Monoid', but it is an instance of 'Apply'+-- | An @'EnvT' e w@ is not 'Applicative' unless its @e@ is a 'Monoid', but it is an instance of 'Apply' instance (Semigroup e, Apply w) => Apply (EnvT e w) where EnvT ef wf <.> EnvT ea wa = EnvT (ef <> ea) (wf <.> wa) --- | A 'StoreT s w' is not 'Applicative' unless its 's' is a 'Monoid', but it is an instance of 'Apply'+-- | A @'StoreT' s w@ is not 'Applicative' unless its @s@ is a 'Monoid', but it is an instance of 'Apply' instance (Apply w, Semigroup s) => Apply (StoreT s w) where StoreT ff m <.> StoreT fa n = StoreT ((<*>) <$> ff <.> fa) (m <> n) @@ -481,7 +481,7 @@ instance Apply U1 where (<.>)=(<*>);(.>)=(*>);(<.)=(<*) --- | A 'K1 i c' is not 'Applicative' unless its 'c' is a 'Monoid', but it is an instance of 'Apply'+-- | A @'K1' i c@ is not 'Applicative' unless its @c@ is a 'Monoid', but it is an instance of 'Apply' instance Semigroup c => Apply (K1 i c) where K1 a <.> K1 b = K1 (a <> b) K1 a <. K1 b = K1 (a <> b)@@ -536,8 +536,8 @@ apDefault :: Bind f => f (a -> b) -> f a -> f b apDefault f x = f >>- \f' -> f' <$> x --- | A '(,) m' is not a 'Monad' unless its 'm' is a 'Monoid', but it is an instance of 'Bind'-instance Semigroup m => Bind ((,)m) where+-- | A @'(,)' m@ is not a 'Monad' unless its @m@ is a 'Monoid', but it is an instance of 'Bind'+instance Semigroup m => Bind ((,) m) where ~(m, a) >>- f = let (n, b) = f a in (m <> n, b) #ifdef MIN_VERSION_tagged@@ -614,14 +614,14 @@ instance Bind m => Bind (ReaderT e m) where ReaderT m >>- f = ReaderT $ \e -> m e >>- \x -> runReaderT (f x) e --- | A 'WriterT w m' is not a 'Monad' unless its 'w' is a 'Monoid', but it is an instance of 'Bind'+-- | A @'Lazy.WriterT' w m@ is not a 'Monad' unless its @w@ is a 'Monoid', but it is an instance of 'Bind' instance (Bind m, Semigroup w) => Bind (Lazy.WriterT w m) where m >>- k = Lazy.WriterT $ Lazy.runWriterT m >>- \ ~(a, w) -> Lazy.runWriterT (k a) `returning` \ ~(b, w') -> (b, w <> w') --- | A 'WriterT w m' is not a 'Monad' unless its 'w' is a 'Monoid', but it is an instance of 'Bind'+-- | A @'Strict.WriterT' w m@ is not a 'Monad' unless its @w@ is a 'Monoid', but it is an instance of 'Bind' instance (Bind m, Semigroup w) => Bind (Strict.WriterT w m) where m >>- k = Strict.WriterT $ Strict.runWriterT m >>- \ (a, w) ->@@ -638,14 +638,14 @@ Strict.runStateT m s >>- \ ~(a, s') -> Strict.runStateT (k a) s' --- | An 'RWST r w s m' is not a 'Monad' unless its 'w' is a 'Monoid', but it is an instance of 'Bind'+-- | An @'Lazy.RWST' r w s m@ is not a 'Monad' unless its @w@ is a 'Monoid', but it is an instance of 'Bind' instance (Bind m, Semigroup w) => Bind (Lazy.RWST r w s m) where m >>- k = Lazy.RWST $ \r s -> Lazy.runRWST m r s >>- \ ~(a, s', w) -> Lazy.runRWST (k a) r s' `returning` \ ~(b, s'', w') -> (b, s'', w <> w') --- | An 'RWST r w s m' is not a 'Monad' unless its 'w' is a 'Monoid', but it is an instance of 'Bind'+-- | An @'Strict.RWST' r w s m@ is not a 'Monad' unless its @w@ is a 'Monoid', but it is an instance of 'Bind' instance (Bind m, Semigroup w) => Bind (Strict.RWST r w s m) where m >>- k = Strict.RWST $ \r s -> Strict.runRWST m r s >>- \ (a, s', w) ->
src/Data/Functor/Bind/Trans.hs view
@@ -1,4 +1,9 @@ {-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Bind.Trans
src/Data/Groupoid.hs view
@@ -4,7 +4,9 @@ #if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds #-} #endif-+#if __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett
src/Data/Isomorphism.hs view
@@ -2,6 +2,11 @@ #if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds #-} #endif+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett
src/Data/Semigroup/Bifoldable.hs view
@@ -1,4 +1,9 @@ {-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett
src/Data/Semigroup/Bitraversable.hs view
@@ -1,4 +1,9 @@ {-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett
src/Data/Semigroup/Foldable.hs view
@@ -1,3 +1,9 @@+{-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett@@ -32,13 +38,14 @@ -- $setup -- >>> import Data.List.NonEmpty+-- >>> import Data.Monoid (Monoid (..)) newtype JoinWith a = JoinWith {joinee :: (a -> a)} instance Semigroup a => Semigroup (JoinWith a) where JoinWith a <> JoinWith b = JoinWith $ \j -> a j <> j <> b j --- | Insert an 'm' between each pair of 't m'. Equivalent to+-- | Insert an @m@ between each pair of @t m@. Equivalent to -- 'intercalateMap1' with 'id' as the second argument. -- -- >>> intercalate1 ", " $ "hello" :| ["how", "are", "you"]@@ -53,7 +60,7 @@ intercalate1 = flip intercalateMap1 id {-# INLINE intercalate1 #-} --- | Insert 'm' between each pair of 'm' derived from 'a'.+-- | Insert @m@ between each pair of @m@ derived from @a@. -- -- >>> intercalateMap1 " " show $ True :| [False, True] -- "True False True"
src/Data/Semigroup/Traversable.hs view
@@ -1,4 +1,9 @@ {-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett
src/Data/Semigroupoid.hs view
@@ -5,7 +5,7 @@ {-# LANGUAGE PolyKinds #-} #endif -#if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL <= 706 && defined(MIN_VERSION_comonad) && !(MIN_VERSION_comonad(3,0,3))+#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif
src/Data/Semigroupoid/Dual.hs view
@@ -2,6 +2,11 @@ #if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds #-} #endif+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2007-2015 Edward Kmett
src/Data/Semigroupoid/Ob.hs view
@@ -5,6 +5,11 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett
src/Data/Semigroupoid/Static.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE CPP #-} -#if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL <= 706 && defined(MIN_VERSION_comonad) && !(MIN_VERSION_comonad(3,0,3))+#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif
src/Data/Traversable/Instances.hs view
@@ -1,3 +1,9 @@+{-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015,2018 Edward Kmett
− test/doctests.hs
@@ -1,25 +0,0 @@--------------------------------------------------------------------------------- |--- Module : Main (doctests)--- Copyright : (C) 2012-14 Edward Kmett--- License : BSD-style (see the file LICENSE)--- Maintainer : Edward Kmett <ekmett@gmail.com>--- Stability : provisional--- Portability : portable------ This module provides doctests for a project based on the actual versions--- of the packages it was built with. It requires a corresponding Setup.lhs--- to be added to the project-------------------------------------------------------------------------------module Main where--import Build_doctests (flags, pkgs, module_sources)-import Data.Foldable (traverse_)-import Test.DocTest--main :: IO ()-main = do- traverse_ putStrLn args- doctest args- where- args = flags ++ pkgs ++ module_sources