git.iko.soy/monoidal-containers
on master help sign in
Merge pull request #48 from bgamari/aa-phadej-these

Add flag to select whether to use split these/semialign packages or not

commitfd7b4b40e8da5b6925c5b0dd627832c640265ff4 authorAli Abrar <aliabrar@gmail.com> dateMon 5 Aug 2019, 00:23 (7 years ago) parentdf270e8d0401dc
4 files changed+43−4
.travis.yml+4 Changelog.md+5 default.nix+18 monoidal-containers.cabal+16−4
.travis.yml+4
@@ -131,5 +131,9 @@ script:
131131 # Build without installed constraints for packages in global-db
132132 - 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
133133
134+ # Build with split-these set to false
135+ - cabal new-configure -f-split-these
136+ - cabal new-build -w ${HC} ${TEST} ${BENCH} all
137+
134138# REGENDATA ["monoidal-containers.cabal"]
135139# EOF
Changelog.md+5
@@ -1,5 +1,10 @@
11# Monoidal containers
22
3+# 0.5.0.1
4+
5+ * Add a flag, `split-these`, to select whether to use the new "these"/"semialign" packages or the older combined "these" package.
6+ * Add default.nix to make it easier to hack on this package in nix
7+
38# 0.5.0.0
49
510 * Added Data.IntMap.Monoidal and Data.IntMap.Monoidal.Strict, corresponding to Data.IntMap and Data.IntMap.Strict
default.nixnew file+18
@@ -0,0 +1,18 @@
1+{ mkDerivation, aeson, base, containers, deepseq, hashable, lens
2+, newtype, semialign ? null, semigroups, stdenv, these
3+, unordered-containers
4+}:
5+mkDerivation {
6+ pname = "monoidal-containers";
7+ version = "0.5.0.1";
8+ src = ./.;
9+ libraryHaskellDepends = [
10+ aeson base containers deepseq hashable lens newtype
11+ semigroups these unordered-containers
12+ ] ++ stdenv.lib.optional (semialign == null) [ semialign ];
13+ configureFlags =
14+ stdenv.lib.optional (semialign == null) [ "-f-split-these" ];
15+ homepage = "http://github.com/bgamari/monoidal-containers";
16+ description = "Containers with monoidal accumulation";
17+ license = stdenv.lib.licenses.bsd3;
18+}
monoidal-containers.cabal+16−4
@@ -1,5 +1,5 @@
11name: monoidal-containers
2−version: 0.5.0.0
2+version: 0.5.0.1
33synopsis: Containers with monoidal accumulation
44description:
55 Containers with merging via monoidal accumulation. The 'Monoid' instances
@@ -30,6 +30,11 @@ source-repository head
3030 type: git
3131 location: git://github.com/bgamari/monoidal-containers
3232
33+flag split-these
34+ description: Use split these/semialign packages
35+ manual: False
36+ default: True
37+
3338library
3439 exposed-modules: Data.Map.Monoidal
3540 Data.HashMap.Monoidal
@@ -46,10 +51,17 @@ library
4651 containers >=0.5 && <0.7,
4752 deepseq >=1.3 && <1.5,
4853 unordered-containers >= 0.2 && < 0.3,
49− hashable >= 1.2 && < 1.3,
54+ hashable >= 1.2 && < 1.4,
5055 lens >=4.4 && <5,
5156 newtype >=0.2 && <0.3,
52− semigroups >= 0.18 && < 0.19,
53− these <= 0.8.1
57+ semigroups >= 0.18 && < 0.20
58+
59+ if flag(split-these)
60+ build-depends: these >= 1 && <1.1,
61+ semialign >=1 && <1.1
62+
63+ else
64+ build-depends: these >= 0.7 && <0.9
65+
5466 hs-source-dirs: src
5567 default-language: Haskell2010