git.iko.soy/monoidal-containers
on master help sign in
Merge branch 'master' into patch-2
96dd573Ali Abrar
.travis.yml+46−41
@@ -2,13 +2,18 @@
2#
2#
3# haskell-ci 'monoidal-containers.cabal' '-o' '.travis.yml'
3# haskell-ci 'monoidal-containers.cabal' '-o' '.travis.yml'
4#
4#
5+# To regenerate the script (for example after adjusting tested-with) run
6+#
7+# haskell-ci regenerate
8+#
5# For more information, see https://github.com/haskell-CI/haskell-ci
9# For more information, see https://github.com/haskell-CI/haskell-ci
6#
10#
7−# version: 0.3.20190814
11+# version: 0.10.3
8#
12#
13+version: ~> 1.0
9language: c
14language: c
15+os: linux
10dist: xenial
16dist: xenial
11−sudo: required
12git:
17git:
13 # whether to recursively clone submodules
18 # whether to recursively clone submodules
14 submodules: false
19 submodules: false
@@ -16,6 +21,7 @@ cache:
16 directories:
21 directories:
17 - $HOME/.cabal/packages
22 - $HOME/.cabal/packages
18 - $HOME/.cabal/store
23 - $HOME/.cabal/store
24+ - $HOME/.hlint
19before_cache:
25before_cache:
20 - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
26 - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
21 # remove files that are regenerated by 'cabal update'
27 # remove files that are regenerated by 'cabal update'
@@ -25,23 +31,33 @@ before_cache:
25 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
31 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
26 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
32 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
27 - rm -rfv $CABALHOME/packages/head.hackage
33 - rm -rfv $CABALHOME/packages/head.hackage
28−matrix:
34+jobs:
29 include:
35 include:
30− - compiler: ghc-8.8.1
36+ - compiler: ghc-8.10.2
37+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.2","cabal-install-3.2"]}}
38+ os: linux
39+ - compiler: ghc-8.8.4
31− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
40+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.4","cabal-install-3.2"]}}
41+ os: linux
32 - compiler: ghc-8.6.5
42 - compiler: ghc-8.6.5
33− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
43+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
44+ os: linux
34 - compiler: ghc-8.4.3
45 - compiler: ghc-8.4.3
35− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.3","cabal-install-2.4"]}}
46+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.3","cabal-install-3.2"]}}
47+ os: linux
36 - compiler: ghc-8.2.2
48 - compiler: ghc-8.2.2
37− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}
49+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.2"]}}
50+ os: linux
38 - compiler: ghc-8.0.2
51 - compiler: ghc-8.0.2
39− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
52+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.2"]}}
53+ os: linux
40 - compiler: ghc-7.8.4
54 - compiler: ghc-7.8.4
41− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.4","cabal-install-2.4"]}}
55+ addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.8.4","cabal-install-3.2"]}}
56+ os: linux
42before_install:
57before_install:
43 - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
58 - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
44 - WITHCOMPILER="-w $HC"
59 - WITHCOMPILER="-w $HC"
60+ - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
45 - HCPKG="$HC-pkg"
61 - HCPKG="$HC-pkg"
46 - unset CC
62 - unset CC
47 - CABAL=/opt/ghc/bin/cabal
63 - CABAL=/opt/ghc/bin/cabal
@@ -50,29 +66,8 @@ before_install:
50 - TOP=$(pwd)
66 - TOP=$(pwd)
51 - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
67 - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
52 - echo $HCNUMVER
68 - echo $HCNUMVER
53− - CABAL="$CABAL -vnormal+nowrap+markoutput"
69+ - CABAL="$CABAL -vnormal+nowrap"
54 - set -o pipefail
70 - set -o pipefail
55− - |
56− echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
57− echo 'BEGIN { state = "output"; }' >> .colorful.awk
58− echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
59− echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
60− echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
61− echo ' if (state == "cabal") {' >> .colorful.awk
62− echo ' print blue($0)' >> .colorful.awk
63− echo ' } else {' >> .colorful.awk
64− echo ' print $0' >> .colorful.awk
65− echo ' }' >> .colorful.awk
66− echo '}' >> .colorful.awk
67− - cat .colorful.awk
68− - |
69− color_cabal_output () {
70− awk -f $TOP/.colorful.awk
71− }
72− - echo text | color_cabal_output
73−install:
74− - ${CABAL} --version
75− - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
76 - TEST=--enable-tests
71 - TEST=--enable-tests
77 - BENCH=--enable-benchmarks
72 - BENCH=--enable-benchmarks
78 - HEADHACKAGE=false
73 - HEADHACKAGE=false
@@ -93,6 +88,12 @@ install:
93 echo " prefix: $CABALHOME" >> $CABALHOME/config
88 echo " prefix: $CABALHOME" >> $CABALHOME/config
94 echo "repository hackage.haskell.org" >> $CABALHOME/config
89 echo "repository hackage.haskell.org" >> $CABALHOME/config
95 echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
90 echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
91+install:
92+ - ${CABAL} --version
93+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
94+ - |
95+ echo "program-default-options" >> $CABALHOME/config
96+ echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
96 - cat $CABALHOME/config
97 - cat $CABALHOME/config
97 - rm -fv cabal.project cabal.project.local cabal.project.freeze
98 - rm -fv cabal.project cabal.project.local cabal.project.freeze
98 - travis_retry ${CABAL} v2-update -v
99 - travis_retry ${CABAL} v2-update -v
@@ -101,20 +102,22 @@ install:
101 - touch cabal.project
102 - touch cabal.project
102 - |
103 - |
103 echo "packages: ." >> cabal.project
104 echo "packages: ." >> cabal.project
105+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package monoidal-containers' >> cabal.project ; fi
106+ - "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
104 - |
107 - |
105 - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(monoidal-containers)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
108 - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(monoidal-containers)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
106 - cat cabal.project || true
109 - cat cabal.project || true
107 - cat cabal.project.local || true
110 - cat cabal.project.local || true
108 - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
111 - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
109− - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
112+ - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
110 - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
113 - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
111 - rm cabal.project.freeze
114 - rm cabal.project.freeze
112− - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
115+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
113− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
116+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
114script:
117script:
115 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
118 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
116 # Packaging...
119 # Packaging...
117− - ${CABAL} v2-sdist all | color_cabal_output
120+ - ${CABAL} v2-sdist all
118 # Unpacking...
121 # Unpacking...
119 - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
122 - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
120 - cd ${DISTDIR} || false
123 - cd ${DISTDIR} || false
@@ -126,23 +129,25 @@ script:
126 - touch cabal.project
129 - touch cabal.project
127 - |
130 - |
128 echo "packages: ${PKGDIR_monoidal_containers}" >> cabal.project
131 echo "packages: ${PKGDIR_monoidal_containers}" >> cabal.project
132+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package monoidal-containers' >> cabal.project ; fi
133+ - "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
129 - |
134 - |
130 - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(monoidal-containers)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
135 - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(monoidal-containers)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
131 - cat cabal.project || true
136 - cat cabal.project || true
132 - cat cabal.project.local || true
137 - cat cabal.project.local || true
133 # Building...
138 # Building...
134 # this builds all libraries and executables (without tests/benchmarks)
139 # this builds all libraries and executables (without tests/benchmarks)
135− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
140+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
136 # Building with tests and benchmarks...
141 # Building with tests and benchmarks...
137 # build & run tests, build benchmarks
142 # build & run tests, build benchmarks
138− - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
143+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
139 # cabal check...
144 # cabal check...
140 - (cd ${PKGDIR_monoidal_containers} && ${CABAL} -vnormal check)
145 - (cd ${PKGDIR_monoidal_containers} && ${CABAL} -vnormal check)
141 # haddock...
146 # haddock...
142− - ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
147+ - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
143 # Building without installed constraints for packages in global-db...
148 # Building without installed constraints for packages in global-db...
144 - rm -f cabal.project.local
149 - rm -f cabal.project.local
145− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
150+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
146
151
147−# REGENDATA ["monoidal-containers.cabal","-o",".travis.yml"]
152+# REGENDATA ("0.10.3",["monoidal-containers.cabal","-o",".travis.yml"])
148# EOF
153# EOF
monoidal-containers.cabal+2−3
@@ -24,7 +24,7 @@ category: Data
24build-type: Simple
24build-type: Simple
25cabal-version: >=1.10
25cabal-version: >=1.10
26extra-source-files: Changelog.md
26extra-source-files: Changelog.md
27−tested-with: GHC ==7.8.4, GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.3, GHC ==8.6.5, GHC ==8.8.1
27+tested-with: GHC ==7.8.4, GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.3, GHC ==8.6.5, GHC ==8.8.4, GHC ==8.10.2
28
28
29source-repository head
29source-repository head
30 type: git
30 type: git
@@ -47,7 +47,7 @@ library
47 DeriveTraversable,
47 DeriveTraversable,
48 DeriveDataTypeable
48 DeriveDataTypeable
49 build-depends: base >=4.7 && <4.15,
49 build-depends: base >=4.7 && <4.15,
50− aeson >=1.0 && <1.5,
50+ aeson >=1.0 && <1.6,
51 containers >=0.5 && <0.7,
51 containers >=0.5 && <0.7,
52 deepseq >=1.3 && <1.5,
52 deepseq >=1.3 && <1.5,
53 unordered-containers >= 0.2 && < 0.3,
53 unordered-containers >= 0.2 && < 0.3,
@@ -59,7 +59,6 @@ library
59 if flag(split-these)
59 if flag(split-these)
60 build-depends: these >= 1 && <1.2,
60 build-depends: these >= 1 && <1.2,
61 semialign >=1 && <1.2
61 semialign >=1 && <1.2
62−
63 else
62 else
64 build-depends: these >= 0.7 && <0.9
63 build-depends: these >= 0.7 && <0.9
65
64
src/Data/HashMap/Monoidal.hs+2
@@ -61,6 +61,7 @@ import Control.Lens
61import Control.Newtype
61import Control.Newtype
62import Data.Align
62import Data.Align
63#ifdef MIN_VERSION_semialign
63#ifdef MIN_VERSION_semialign
64+import Data.Semialign (Unalign)
64#if MIN_VERSION_semialign(1,1,0)
65#if MIN_VERSION_semialign(1,1,0)
65import Data.Zip (Zip)
66import Data.Zip (Zip)
66#endif
67#endif
@@ -77,6 +78,7 @@ newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap
77 , Semialign
78 , Semialign
78#endif
79#endif
79#ifdef MIN_VERSION_semialign
80#ifdef MIN_VERSION_semialign
81+ , Unalign
80#if MIN_VERSION_semialign(1,1,0)
82#if MIN_VERSION_semialign(1,1,0)
81 , Zip
83 , Zip
82#endif
84#endif
src/Data/IntMap/Monoidal.hs+2
@@ -152,6 +152,7 @@ import Data.Functor.Classes
152#endif
152#endif
153import Data.Align
153import Data.Align
154#ifdef MIN_VERSION_semialign
154#ifdef MIN_VERSION_semialign
155+import Data.Semialign (Unalign)
155#if MIN_VERSION_semialign(1,1,0)
156#if MIN_VERSION_semialign(1,1,0)
156import Data.Zip (Zip)
157import Data.Zip (Zip)
157#endif
158#endif
@@ -167,6 +168,7 @@ newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
167 , Semialign
168 , Semialign
168#endif
169#endif
169#ifdef MIN_VERSION_semialign
170#ifdef MIN_VERSION_semialign
171+ , Unalign
170#if MIN_VERSION_semialign(1,1,0)
172#if MIN_VERSION_semialign(1,1,0)
171 , Zip
173 , Zip
172#endif
174#endif
src/Data/IntMap/Monoidal/Strict.hs+3−1
@@ -152,6 +152,7 @@ import Data.Functor.Classes
152#endif
152#endif
153import Data.Align
153import Data.Align
154#ifdef MIN_VERSION_semialign
154#ifdef MIN_VERSION_semialign
155+import Data.Semialign (Unalign)
155#if MIN_VERSION_semialign(1,1,0)
156#if MIN_VERSION_semialign(1,1,0)
156import Data.Zip (Zip)
157import Data.Zip (Zip)
157#endif
158#endif
@@ -164,9 +165,10 @@ newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
164 FromJSON, ToJSON, FromJSON1, ToJSON1,
165 FromJSON, ToJSON, FromJSON1, ToJSON1,
165 Data, Typeable, Align
166 Data, Typeable, Align
166#if MIN_VERSION_these(0,8,0)
167#if MIN_VERSION_these(0,8,0)
167− , Semialign
168+ , Semialign
168#endif
169#endif
169#ifdef MIN_VERSION_semialign
170#ifdef MIN_VERSION_semialign
171+ , Unalign
170#if MIN_VERSION_semialign(1,1,0)
172#if MIN_VERSION_semialign(1,1,0)
171 , Zip
173 , Zip
172#endif
174#endif
src/Data/Map/Monoidal.hs+2
@@ -152,6 +152,7 @@ import Data.Functor.Classes
152#endif
152#endif
153import Data.Align
153import Data.Align
154#ifdef MIN_VERSION_semialign
154#ifdef MIN_VERSION_semialign
155+import Data.Semialign (Unalign)
155#if MIN_VERSION_semialign(1,1,0)
156#if MIN_VERSION_semialign(1,1,0)
156import Data.Zip (Zip)
157import Data.Zip (Zip)
157#endif
158#endif
@@ -167,6 +168,7 @@ newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
167 , Semialign
168 , Semialign
168#endif
169#endif
169#ifdef MIN_VERSION_semialign
170#ifdef MIN_VERSION_semialign
171+ , Unalign
170#if MIN_VERSION_semialign(1,1,0)
172#if MIN_VERSION_semialign(1,1,0)
171 , Zip
173 , Zip
172#endif
174#endif
src/Data/Map/Monoidal/Strict.hs+2−2
@@ -152,6 +152,7 @@ import Data.Functor.Classes
152#endif
152#endif
153import Data.Align
153import Data.Align
154#ifdef MIN_VERSION_semialign
154#ifdef MIN_VERSION_semialign
155+import Data.Semialign (Unalign)
155#if MIN_VERSION_semialign(1,1,0)
156#if MIN_VERSION_semialign(1,1,0)
156import Data.Zip (Zip)
157import Data.Zip (Zip)
157#endif
158#endif
@@ -167,6 +168,7 @@ newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
167 , Semialign
168 , Semialign
168#endif
169#endif
169#ifdef MIN_VERSION_semialign
170#ifdef MIN_VERSION_semialign
171+ , Unalign
170#if MIN_VERSION_semialign(1,1,0)
172#if MIN_VERSION_semialign(1,1,0)
171 , Zip
173 , Zip
172#endif
174#endif
@@ -697,5 +699,3 @@ maxViewWithKey = coerce (M.maxViewWithKey :: M.Map k a -> Maybe ((k, a), M.Map k
697valid :: forall k a. Ord k => MonoidalMap k a -> Bool
699valid :: forall k a. Ord k => MonoidalMap k a -> Bool
698valid = coerce (M.valid :: Ord k => M.Map k a -> Bool)
700valid = coerce (M.valid :: Ord k => M.Map k a -> Bool)
699{-# INLINE valid #-}
701{-# INLINE valid #-}
700−
701−