git.iko.soy/monoidal-containers
on master help sign in
Merge pull request #24 from bgamari/test
e8e44cdBen Gamari
.travis.yml+31−18
@@ -28,24 +28,27 @@ before_cache:
28
28
29matrix:
29matrix:
30 include:
30 include:
31− - compiler: "ghc-7.6.3"
31+ - compiler: "ghc-8.6.1"
32+ env: GHCHEAD=true
33+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.6.1], sources: [hvr-ghc]}}
34+ - compiler: "ghc-8.4.3"
32 # env: TEST=--disable-tests BENCH=--disable-benchmarks
35 # env: TEST=--disable-tests BENCH=--disable-benchmarks
33− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.3], sources: [hvr-ghc]}}
36+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
34− - compiler: "ghc-7.8.4"
37+ - compiler: "ghc-8.2.2"
35 # env: TEST=--disable-tests BENCH=--disable-benchmarks
38 # env: TEST=--disable-tests BENCH=--disable-benchmarks
36− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
39+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.2.2], sources: [hvr-ghc]}}
37 - compiler: "ghc-8.0.2"
40 - compiler: "ghc-8.0.2"
38 # env: TEST=--disable-tests BENCH=--disable-benchmarks
41 # env: TEST=--disable-tests BENCH=--disable-benchmarks
39− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
42+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.0.2], sources: [hvr-ghc]}}
40− - compiler: "ghc-8.2.2"
43+ - compiler: "ghc-7.8.4"
41 # env: TEST=--disable-tests BENCH=--disable-benchmarks
44 # env: TEST=--disable-tests BENCH=--disable-benchmarks
42− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
45+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.8.4], sources: [hvr-ghc]}}
43− - compiler: "ghc-8.4.1"
46+ - compiler: "ghc-7.6.3"
44− env: GHCHEAD=true
47+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
45− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.4.1], sources: [hvr-ghc]}}
48+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.6.3], sources: [hvr-ghc]}}
46
49
47 allow_failures:
50 allow_failures:
48− - compiler: "ghc-8.4.1"
51+ - compiler: "ghc-8.6.1"
49
52
50before_install:
53before_install:
51 - HC=${CC}
54 - HC=${CC}
@@ -63,7 +66,8 @@ install:
63 - BENCH=${BENCH---enable-benchmarks}
66 - BENCH=${BENCH---enable-benchmarks}
64 - TEST=${TEST---enable-tests}
67 - TEST=${TEST---enable-tests}
65 - HADDOCK=${HADDOCK-true}
68 - HADDOCK=${HADDOCK-true}
66− - INSTALLED=${INSTALLED-true}
69+ - UNCONSTRAINED=${UNCONSTRAINED-true}
70+ - NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
67 - GHCHEAD=${GHCHEAD-false}
71 - GHCHEAD=${GHCHEAD-false}
68 - travis_retry cabal update -v
72 - travis_retry cabal update -v
69 - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
73 - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
@@ -71,7 +75,8 @@ install:
71 # Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
75 # Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
72 - |
76 - |
73 if $GHCHEAD; then
77 if $GHCHEAD; then
74− sed -i.bak 's/-- allow-newer:.*/allow-newer: *:base, *:template-haskell, *:ghc, *:Cabal/' ${HOME}/.cabal/config
78+ sed -i 's/-- allow-newer: .*/allow-newer: *:base/' ${HOME}/.cabal/config
79+ for pkg in $($HCPKG list --simple-output); do pkg=$(echo $pkg | sed 's/-[^-]*$//'); sed -i "s/allow-newer: /allow-newer: *:$pkg, /" ${HOME}/.cabal/config; done
75
80
76 echo 'repository head.hackage' >> ${HOME}/.cabal/config
81 echo 'repository head.hackage' >> ${HOME}/.cabal/config
77 echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
82 echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
@@ -81,11 +86,16 @@ install:
81 echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
86 echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
82 echo ' key-threshold: 3' >> ${HOME}/.cabal.config
87 echo ' key-threshold: 3' >> ${HOME}/.cabal.config
83
88
89+ grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
90+
84 cabal new-update head.hackage -v
91 cabal new-update head.hackage -v
85 fi
92 fi
86 - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
93 - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
87 - "printf 'packages: \".\"\\n' > cabal.project"
94 - "printf 'packages: \".\"\\n' > cabal.project"
95+ - touch cabal.project.local
96+ - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- monoidal-containers | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
97+ - cat cabal.project || true
88− - cat cabal.project
98+ - cat cabal.project.local || true
89 - if [ -f "./configure.ac" ]; then
99 - if [ -f "./configure.ac" ]; then
90 (cd "." && autoreconf -i);
100 (cd "." && autoreconf -i);
91 fi
101 fi
@@ -104,13 +114,13 @@ script:
104 - cd ${DISTDIR} || false
114 - cd ${DISTDIR} || false
105 - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
115 - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
106 - "printf 'packages: monoidal-containers-*/*.cabal\\n' > cabal.project"
116 - "printf 'packages: monoidal-containers-*/*.cabal\\n' > cabal.project"
117+ - touch cabal.project.local
118+ - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- monoidal-containers | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
119+ - cat cabal.project || true
107− - cat cabal.project
120+ - cat cabal.project.local || true
108 # this builds all libraries and executables (without tests/benchmarks)
121 # this builds all libraries and executables (without tests/benchmarks)
109 - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
122 - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
110
123
111− # Build with installed constraints for packages in global-db
112− - if $INSTALLED; then echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh; else echo "Not building with installed constraints"; fi
113−
114 # build & run tests, build benchmarks
124 # build & run tests, build benchmarks
115 - cabal new-build -w ${HC} ${TEST} ${BENCH} all
125 - cabal new-build -w ${HC} ${TEST} ${BENCH} all
116
126
@@ -121,5 +131,8 @@ script:
121 - rm -rf ./dist-newstyle
131 - rm -rf ./dist-newstyle
122 - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
132 - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
123
133
134+ # Build without installed constraints for packages in global-db
135+ - if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi
136+
124# REGENDATA ["monoidal-containers.cabal"]
137# REGENDATA ["monoidal-containers.cabal"]
125# EOF
138# EOF
Changelog.mdnew file+17
@@ -0,0 +1,17 @@
1+# Monoidal containers
2+
3+# 0.4.0.0
4+
5+Weakened `Monoid` constraints to `Semigroup` whenever possible as enabled by the
6+[Semigroup-Monoid
7+proposal](https://prime.haskell.org/wiki/Libraries/Proposals/SemigroupMonoid).
8+This includes,
9+
10+ * the `Monoid` instance of `MonoidalHashMap` and `MonoidalMap`
11+ * the `IsList` instance of `MonoidalHashMap` and `MonoidalMap`
12+ * the `modifyDef` and `mapKeys` functions of `MonoidalHashMap`
13+
14+
15+# 0.3 and earlier
16+
17+Pre-history
monoidal-containers.cabal+4−3
@@ -1,5 +1,5 @@
1name: monoidal-containers
1name: monoidal-containers
2−version: 0.3.1.0
2+version: 0.4.0.0
3synopsis: Containers with monoidal accumulation
3synopsis: Containers with monoidal accumulation
4description:
4description:
5 Containers with merging via monoidal accumulation. The 'Monoid' instances
5 Containers with merging via monoidal accumulation. The 'Monoid' instances
@@ -23,7 +23,8 @@ copyright: (c) 2014 Ben Gamari
23category: Data
23category: Data
24build-type: Simple
24build-type: Simple
25cabal-version: >=1.10
25cabal-version: >=1.10
26+extra-source-files: Changelog.md
26−tested-with: GHC ==7.6.3, GHC ==7.8.4, GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.1
27+tested-with: GHC ==7.6.3, GHC ==7.8.4, GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.3, GHC ==8.6.1
27
28
28source-repository head
29source-repository head
29 type: git
30 type: git
@@ -39,7 +40,7 @@ library
39 DeriveTraversable,
40 DeriveTraversable,
40 DeriveDataTypeable
41 DeriveDataTypeable
41 build-depends: base >=4.5 && <4.12,
42 build-depends: base >=4.5 && <4.12,
42− containers >=0.5 && <0.6,
43+ containers >=0.5 && <0.7,
43 deepseq >=1.3 && <1.5,
44 deepseq >=1.3 && <1.5,
44 unordered-containers >= 0.2 && < 0.3,
45 unordered-containers >= 0.2 && < 0.3,
45 hashable >= 1.2 && < 1.3,
46 hashable >= 1.2 && < 1.3,