git.iko.soy/monoidal-containers
on master help sign in
Support semialign-1.1
commitd1117858d7f0bc3c4061ba4a699d7dc875c84231 authorOleg Grenrus <oleg.grenrus@iki.fi> dateMon 21 Oct 2019, 13:46 (7 years ago) parent6dde3c9
6 files changed+51−1
monoidal-containers.cabal+1−1 src/Data/HashMap/Monoidal.hs+10 src/Data/IntMap/Monoidal.hs+10 src/Data/IntMap/Monoidal/Strict.hs+10 src/Data/Map/Monoidal.hs+10 src/Data/Map/Monoidal/Strict.hs+10
monoidal-containers.cabal+1−1
@@ -58,7 +58,7 @@ library
5858
5959 if flag(split-these)
6060 build-depends: these >= 1 && <1.1,
61− semialign >=1 && <1.1
61+ semialign >=1 && <1.2
6262
6363 else
6464 build-depends: these >= 0.7 && <0.9
src/Data/HashMap/Monoidal.hs+10
@@ -60,6 +60,11 @@ import Data.Hashable.Lifted (Hashable1)
6060import Control.Lens
6161import Control.Newtype
6262import Data.Align
63+#ifdef MIN_VERSION_semialign
64+#if MIN_VERSION_semialign(1,1,0)
65+import Data.Zip (Zip)
66+#endif
67+#endif
6368
6469-- | A 'HashMap' with monoidal accumulation
6570newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap k a }
@@ -70,6 +75,11 @@ newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap
7075#endif
7176#if MIN_VERSION_these(0,8,0)
7277 , Semialign
78+#endif
79+#ifdef MIN_VERSION_semialign
80+#if MIN_VERSION_semialign(1,1,0)
81+ , Zip
82+#endif
7383#endif
7484 )
7585
src/Data/IntMap/Monoidal.hs+10
@@ -151,6 +151,11 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
151151import Data.Functor.Classes
152152#endif
153153import Data.Align
154+#ifdef MIN_VERSION_semialign
155+#if MIN_VERSION_semialign(1,1,0)
156+import Data.Zip (Zip)
157+#endif
158+#endif
154159
155160-- | An 'IntMap' with monoidal accumulation
156161newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
@@ -160,6 +165,11 @@ newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
160165 Data, Typeable, Align
161166#if MIN_VERSION_these(0,8,0)
162167 , Semialign
168+#endif
169+#ifdef MIN_VERSION_semialign
170+#if MIN_VERSION_semialign(1,1,0)
171+ , Zip
172+#endif
163173#endif
164174 )
165175
src/Data/IntMap/Monoidal/Strict.hs+10
@@ -151,6 +151,11 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
151151import Data.Functor.Classes
152152#endif
153153import Data.Align
154+#ifdef MIN_VERSION_semialign
155+#if MIN_VERSION_semialign(1,1,0)
156+import Data.Zip (Zip)
157+#endif
158+#endif
154159
155160-- | An 'IntMap' with monoidal accumulation
156161newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
@@ -160,6 +165,11 @@ newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
160165 Data, Typeable, Align
161166#if MIN_VERSION_these(0,8,0)
162167 , Semialign
168+#endif
169+#ifdef MIN_VERSION_semialign
170+#if MIN_VERSION_semialign(1,1,0)
171+ , Zip
172+#endif
163173#endif
164174 )
165175
src/Data/Map/Monoidal.hs+10
@@ -151,6 +151,11 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
151151import Data.Functor.Classes
152152#endif
153153import Data.Align
154+#ifdef MIN_VERSION_semialign
155+#if MIN_VERSION_semialign(1,1,0)
156+import Data.Zip (Zip)
157+#endif
158+#endif
154159
155160-- | A 'Map' with monoidal accumulation
156161newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
@@ -160,6 +165,11 @@ newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
160165 , Data, Typeable, Align
161166#if MIN_VERSION_these(0,8,0)
162167 , Semialign
168+#endif
169+#ifdef MIN_VERSION_semialign
170+#if MIN_VERSION_semialign(1,1,0)
171+ , Zip
172+#endif
163173#endif
164174 )
165175
src/Data/Map/Monoidal/Strict.hs+10
@@ -151,6 +151,11 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
151151import Data.Functor.Classes
152152#endif
153153import Data.Align
154+#ifdef MIN_VERSION_semialign
155+#if MIN_VERSION_semialign(1,1,0)
156+import Data.Zip (Zip)
157+#endif
158+#endif
154159
155160-- | A 'Map' with monoidal accumulation
156161newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
@@ -160,6 +165,11 @@ newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
160165 , Data, Typeable, Align
161166#if MIN_VERSION_these(0,8,0)
162167 , Semialign
168+#endif
169+#ifdef MIN_VERSION_semialign
170+#if MIN_VERSION_semialign(1,1,0)
171+ , Zip
172+#endif
163173#endif
164174 )
165175