git.iko.soy/monoidal-containers
on master help sign in
Merge pull request #24 from bgamari/test

Prepare for 0.4

commite8e44cd9074d3f5131c26cf0c7f96280cef885c1 authorBen Gamari <ben@smart-cactus.org> dateMon 30 Jul 2018, 20:02 (8 years ago) parent1ca23e992e4931
3 files changed+52−21
.travis.yml+31−18 Changelog.md+17 monoidal-containers.cabal+4−3
.travis.yml+31−18
@@ -28,24 +28,27 @@ before_cache:
2828
2929matrix:
3030 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"
3235 # env: TEST=--disable-tests BENCH=--disable-benchmarks
33− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.3], sources: [hvr-ghc]}}
34− - compiler: "ghc-7.8.4"
36+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
37+ - compiler: "ghc-8.2.2"
3538 # 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]}}
3740 - compiler: "ghc-8.0.2"
3841 # env: TEST=--disable-tests BENCH=--disable-benchmarks
39− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
40− - compiler: "ghc-8.2.2"
42+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.0.2], sources: [hvr-ghc]}}
43+ - compiler: "ghc-7.8.4"
4144 # env: TEST=--disable-tests BENCH=--disable-benchmarks
42− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
43− - compiler: "ghc-8.4.1"
44− env: GHCHEAD=true
45− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.4.1], sources: [hvr-ghc]}}
45+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.8.4], sources: [hvr-ghc]}}
46+ - compiler: "ghc-7.6.3"
47+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
48+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.6.3], sources: [hvr-ghc]}}
4649
4750 allow_failures:
48− - compiler: "ghc-8.4.1"
51+ - compiler: "ghc-8.6.1"
4952
5053before_install:
5154 - HC=${CC}
@@ -63,7 +66,8 @@ install:
6366 - BENCH=${BENCH---enable-benchmarks}
6467 - TEST=${TEST---enable-tests}
6568 - HADDOCK=${HADDOCK-true}
66− - INSTALLED=${INSTALLED-true}
69+ - UNCONSTRAINED=${UNCONSTRAINED-true}
70+ - NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
6771 - GHCHEAD=${GHCHEAD-false}
6872 - travis_retry cabal update -v
6973 - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
@@ -71,7 +75,8 @@ install:
7175 # Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
7276 - |
7377 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
7580
7681 echo 'repository head.hackage' >> ${HOME}/.cabal/config
7782 echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
@@ -81,11 +86,16 @@ install:
8186 echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
8287 echo ' key-threshold: 3' >> ${HOME}/.cabal.config
8388
89+ grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
90+
8491 cabal new-update head.hackage -v
8592 fi
8693 - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
8794 - "printf 'packages: \".\"\\n' > cabal.project"
88− - cat 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
98+ - cat cabal.project.local || true
8999 - if [ -f "./configure.ac" ]; then
90100 (cd "." && autoreconf -i);
91101 fi
@@ -104,13 +114,13 @@ script:
104114 - cd ${DISTDIR} || false
105115 - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
106116 - "printf 'packages: monoidal-containers-*/*.cabal\\n' > cabal.project"
107− - cat 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
120+ - cat cabal.project.local || true
108121 # this builds all libraries and executables (without tests/benchmarks)
109122 - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
110123
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−
114124 # build & run tests, build benchmarks
115125 - cabal new-build -w ${HC} ${TEST} ${BENCH} all
116126
@@ -121,5 +131,8 @@ script:
121131 - rm -rf ./dist-newstyle
122132 - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
123133
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+
124137# REGENDATA ["monoidal-containers.cabal"]
125138# 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 @@
11name: monoidal-containers
2−version: 0.3.1.0
2+version: 0.4.0.0
33synopsis: Containers with monoidal accumulation
44description:
55 Containers with merging via monoidal accumulation. The 'Monoid' instances
@@ -23,7 +23,8 @@ copyright: (c) 2014 Ben Gamari
2323category: Data
2424build-type: Simple
2525cabal-version: >=1.10
26−tested-with: GHC ==7.6.3, GHC ==7.8.4, GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.1
26+extra-source-files: Changelog.md
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
2728
2829source-repository head
2930 type: git
@@ -39,7 +40,7 @@ library
3940 DeriveTraversable,
4041 DeriveDataTypeable
4142 build-depends: base >=4.5 && <4.12,
42− containers >=0.5 && <0.6,
43+ containers >=0.5 && <0.7,
4344 deepseq >=1.3 && <1.5,
4445 unordered-containers >= 0.2 && < 0.3,
4546 hashable >= 1.2 && < 1.3,