semigroupoids 5.0.1 → 5.1
raw patch · 9 files changed
+137/−60 lines, 9 filesdep ~doctestdep ~transformers-compatsetup-changednew-uploader
Dependency ranges changed: doctest, transformers-compat
Files
- .gitignore +16/−0
- .travis.yml +82/−21
- CHANGELOG.markdown +7/−0
- Setup.lhs +4/−0
- semigroupoids.cabal +6/−6
- src/Data/Functor/Bind.hs +0/−2
- src/Data/Functor/Bind/Class.hs +17/−4
- src/Data/Traversable/Instances.hs +2/−24
- test/doctests.hsc +3/−3
.gitignore view
@@ -11,3 +11,19 @@ *.hi *~ *#+dist-*+cabal-dev+*.chi+*.chs.h+*.dyn_o+*.dyn_hi+.hpc+.hsenv+.cabal-sandbox/+cabal.sandbox.config+*.prof+*.aux+*.hp+*.eventlog+.stack-work/+cabal.project.local
.travis.yml view
@@ -1,41 +1,102 @@+# This file has been generated -- see https://github.com/hvr/multi-ghc-travis language: c sudo: false +cache:+ directories:+ - $HOME/.cabsnap+ - $HOME/.cabal/packages++before_cache:+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar+ matrix: include:- - env: CABALVER=1.16 GHCVER=7.4.2- addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}}- - env: CABALVER=1.16 GHCVER=7.6.3- addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}+ - env: CABALVER=1.18 GHCVER=7.4.2+ compiler: ": #GHC 7.4.2"+ addons: {apt: {packages: [cabal-install-1.18,ghc-7.4.2], sources: [hvr-ghc]}}+ - env: CABALVER=1.18 GHCVER=7.6.3+ compiler: ": #GHC 7.6.3"+ addons: {apt: {packages: [cabal-install-1.18,ghc-7.6.3], sources: [hvr-ghc]}} - env: CABALVER=1.18 GHCVER=7.8.4+ compiler: ": #GHC 7.8.4" addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}- - env: CABALVER=1.22 GHCVER=7.10.1- addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1],sources: [hvr-ghc]}}- - env: CABALVER=head GHCVER=head- addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}+ - env: CABALVER=1.22 GHCVER=7.10.3+ compiler: ": #GHC 7.10.3"+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}+ - env: CABALVER=1.24 GHCVER=8.0.1+ compiler: ": #GHC 8.0.1"+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}+ - env: CABALVER=1.24 GHCVER=head+ compiler: ": #GHC head"+ addons: {apt: {packages: [cabal-install-1.24,ghc-head], sources: [hvr-ghc]}} allow_failures:- - env: CABALVER=head GHCVER=head+ - env: CABALVER=1.24 GHCVER=head before_install:- - export PATH=~/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH- - export CABAL=cabal-$CABALVER- - travis_retry $CABAL update- - if [ "$CABALVER" = "1.22" ]; then $CABAL install Cabal-1.22.4.0; fi- - $CABAL --version+ - unset CC+ - export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH install:- - $CABAL install --enable-tests --only-dependencies+ - cabal --version+ - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"+ - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];+ then+ zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >+ $HOME/.cabal/packages/hackage.haskell.org/00-index.tar;+ fi+ - travis_retry cabal update -v+ - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config+ - cabal install --only-dependencies --enable-tests --dry -v > installplan.txt+ - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt +# check whether current requested install-plan matches cached package-db snapshot+ - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;+ then+ echo "cabal build-cache HIT";+ rm -rfv .ghc;+ cp -a $HOME/.cabsnap/ghc $HOME/.ghc;+ cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;+ else+ echo "cabal build-cache MISS";+ rm -rf $HOME/.cabsnap;+ mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;+ cabal install -j --only-dependencies --enable-tests;+ if [ "$GHCVER" = "7.10.3" ]; then cabal install Cabal-1.22.4.0; fi;+ fi++# snapshot package-db on cache miss+ - if [ ! -d $HOME/.cabsnap ];+ then+ echo "snapshotting package-db to build-cache";+ mkdir $HOME/.cabsnap;+ cp -a $HOME/.ghc $HOME/.cabsnap/ghc;+ cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;+ fi++# Here starts the actual work to be performed for the package under+# test; any command which exits with a non-zero exit code causes the+# build to fail. script:- - $CABAL configure -v2 --enable-tests- - $CABAL build- - $CABAL test- - $CABAL sdist+ # -v2 provides useful information for debugging+ - cabal configure --enable-tests -v2++ # this builds all libraries and executables+ # (including tests/benchmarks)+ - cabal build++ - cabal test++ # tests that a source-distribution can be generated+ - cabal sdist++ # check that the generated source-distribution can be built & installed - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ; cd dist/; if [ -f "$SRC_TGZ" ]; then- $CABAL install "$SRC_TGZ";+ cabal install --force-reinstalls "$SRC_TGZ"; else echo "expected '$SRC_TGZ' not found"; exit 1;@@ -47,4 +108,4 @@ - "irc.freenode.org#haskell-lens" skip_join: true template:- - "\x0313semigroupoids\x0f/\x0306%{branch}\x0f \x0314%{commit}\x0f %{message} \x0302\x1f%{build_url}\x0f"+ - "\x0313semigroupoids\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}"
CHANGELOG.markdown view
@@ -1,3 +1,10 @@+5.1+---+* The remaining orphan instances in `Data.Traversable.Instances` have been replaced in favor of the orphan instances from `transformers-compat-0.5`.+* The documentation now states laws that instances of `Apply` are expected to uphold.+* `doctest-0.11` support+* Fixed compilation of tests with `stack`+ 5.0.1 ------- * `transformers-compat` 0.5 support
Setup.lhs view
@@ -32,6 +32,10 @@ withTestLBI pkg lbi $ \suite suitecfg -> do rewriteFile (dir </> "Build_" ++ testName suite ++ ".hs") $ unlines [ "module Build_" ++ testName suite ++ " where"+ , ""+ , "autogen_dir :: String"+ , "autogen_dir = " ++ show dir+ , "" , "deps :: [String]" , "deps = " ++ (show $ formatdeps (testDeps libcfg suitecfg)) ]
semigroupoids.cabal view
@@ -1,6 +1,6 @@ name: semigroupoids category: Control, Comonads-version: 5.0.1+version: 5.1 license: BSD3 cabal-version: >= 1.8 license-file: LICENSE@@ -11,7 +11,7 @@ bug-reports: http://github.com/ekmett/semigroupoids/issues copyright: Copyright (C) 2011-2015 Edward A. Kmett build-type: Custom-tested-with: GHC==7.0.1, GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.1+tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1 synopsis: Semigroupoids: Category sans id extra-source-files: .ghci@@ -111,7 +111,7 @@ 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 && < 5,@@ -119,7 +119,7 @@ bifunctors >= 5 && < 6, semigroups >= 0.8.3.1 && < 1, transformers >= 0.2 && < 0.6,- transformers-compat >= 0.3 && < 0.6+ transformers-compat >= 0.5 && < 0.6 if flag(containers) build-depends: containers >= 0.3 && < 0.6@@ -131,7 +131,7 @@ build-depends: distributive >= 0.2.2 && < 1 if flag(comonad)- build-depends: comonad >= 4.2.6 && < 5+ build-depends: comonad >= 4.2.6 && < 6 if flag(tagged) build-depends: tagged >= 0.7.3 && < 1@@ -174,7 +174,7 @@ else build-depends: base >= 4 && < 5,- doctest >= 0.9.1 && < 0.11,+ doctest >= 0.9.1 && < 0.12, directory >= 1.0, filepath
src/Data/Functor/Bind.hs view
@@ -4,8 +4,6 @@ {-# LANGUAGE Trustworthy #-} #endif -{-# OPTIONS_GHC -fno-warn-orphans #-}- #if __GLASGOW_HASKELL__ >= 708 && __GLASGOW_HASKELL__ < 710 {-# OPTIONS_GHC -fno-warn-amp #-} #endif
src/Data/Functor/Bind/Class.hs view
@@ -9,7 +9,6 @@ #endif {-# OPTIONS_HADDOCK not-home #-}-{-# OPTIONS_GHC -fno-warn-orphans #-} #if __GLASGOW_HASKELL__ >= 708 && __GLASGOW_HASKELL__ < 710 {-# OPTIONS_GHC -fno-warn-amp #-}@@ -113,15 +112,29 @@ -- -- Laws: ----- > associative composition: (.) <$> u <.> v <.> w = u <.> (v <.> w)+-- @+-- ('.') '<$>' u '<.>' v '<.>' w = u '<.>' (v '<.>' w)+-- x '<.>' (f '<$>' y) = ('.' f) '<$>' x '<.>' y+-- f '<$>' (x '<.>' y) = (f '.') '<$>' x '<.>' y+-- @+--+-- The laws imply that `.>` and `<.` really ignore their+-- left and right results, respectively, and really+-- return their right and left results, respectively.+-- Specifically,+--+-- @+-- (mf '<$>' m) '.>' (nf '<$>' n) = nf '<$>' (m '.>' n)+-- (mf '<$>' m) '<.' (nf '<$>' n) = mf '<$>' (m '<.' n)+-- @ class Functor f => Apply f where (<.>) :: f (a -> b) -> f a -> f b - -- | > a .> b = const id <$> a <.> b+ -- | @ a '.>' b = 'const' 'id' '<$>' a '<.>' b @ (.>) :: f a -> f b -> f b a .> b = const id <$> a <.> b - -- | > a <. b = const <$> a <.> b+ -- | @ a '<.' b = 'const' '<$>' a '<.>' b @ (<.) :: f a -> f b -> f a a <. b = const <$> a <.> b
src/Data/Traversable/Instances.hs view
@@ -1,10 +1,3 @@-{-# LANGUAGE CPP #-}-#ifndef MIN_VERSION_transformers-#define MIN_VERSION_transformers(x,y,z) 1-#endif-#ifndef MIN_VERSION_base-#define MIN_VERSION_base(x,y,z) 1-#endif ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2011-2015 Edward Kmett@@ -14,24 +7,9 @@ -- Stability : provisional -- Portability : polykinds ----- Placeholders for missing instances of 'Traversable', and 'Foldable' until--- base catches up and adds them. Many of these are re-exports from the--- `base-orphans` package.+-- Re-exports from the `base-orphans` and `transformers-compat` packages. ------------------------------------------------------------------------------{-# OPTIONS_GHC -fno-warn-orphans #-} module Data.Traversable.Instances where +import Control.Monad.Trans.Instances () import Data.Orphans ()--#if !(MIN_VERSION_transformers(0,3,0))-import Control.Monad.Trans.Identity-import Data.Foldable-import Data.Traversable--instance Foldable m => Foldable (IdentityT m) where- foldMap f = foldMap f . runIdentityT--instance Traversable m => Traversable (IdentityT m) where- traverse f = fmap IdentityT . traverse f . runIdentityT-#endif
test/doctests.hsc view
@@ -15,7 +15,7 @@ ----------------------------------------------------------------------------- module Main where -import Build_doctests (deps)+import Build_doctests (autogen_dir, deps) #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif@@ -56,9 +56,9 @@ main :: IO () main = withUnicode $ getSources >>= \sources -> doctest $ "-isrc"- : "-idist/build/autogen"+ : ("-i" ++ autogen_dir) : "-optP-include"- : "-optPdist/build/autogen/cabal_macros.h"+ : ("-optP" ++ autogen_dir ++ "/cabal_macros.h") : "-hide-all-packages" : map ("-package="++) deps ++ sources