git.iko.soy/monoidal-containers
on master help sign in
Merge pull request #57 from phadej/semialign-1.1
0196924Ali Abrar
monoidal-containers.cabal+1−1
@@ -58,7 +58,7 @@ library
58
58
59 if flag(split-these)
59 if flag(split-these)
60 build-depends: these >= 1 && <1.1,
60 build-depends: these >= 1 && <1.1,
61− semialign >=1 && <1.1
61+ semialign >=1 && <1.2
62
62
63 else
63 else
64 build-depends: these >= 0.7 && <0.9
64 build-depends: these >= 0.7 && <0.9
src/Data/HashMap/Monoidal.hs+10
@@ -60,6 +60,11 @@ import Data.Hashable.Lifted (Hashable1)
60import Control.Lens
60import Control.Lens
61import Control.Newtype
61import Control.Newtype
62import Data.Align
62import Data.Align
63+#ifdef MIN_VERSION_semialign
64+#if MIN_VERSION_semialign(1,1,0)
65+import Data.Zip (Zip)
66+#endif
67+#endif
63
68
64-- | A 'HashMap' with monoidal accumulation
69-- | A 'HashMap' with monoidal accumulation
65newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap k a }
70newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap k a }
@@ -70,6 +75,11 @@ newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap
70#endif
75#endif
71#if MIN_VERSION_these(0,8,0)
76#if MIN_VERSION_these(0,8,0)
72 , Semialign
77 , Semialign
78+#endif
79+#ifdef MIN_VERSION_semialign
80+#if MIN_VERSION_semialign(1,1,0)
81+ , Zip
82+#endif
73#endif
83#endif
74 )
84 )
75
85
src/Data/IntMap/Monoidal.hs+10
@@ -151,6 +151,11 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
151import Data.Functor.Classes
151import Data.Functor.Classes
152#endif
152#endif
153import Data.Align
153import Data.Align
154+#ifdef MIN_VERSION_semialign
155+#if MIN_VERSION_semialign(1,1,0)
156+import Data.Zip (Zip)
157+#endif
158+#endif
154
159
155-- | An 'IntMap' with monoidal accumulation
160-- | An 'IntMap' with monoidal accumulation
156newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
161newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
@@ -160,6 +165,11 @@ newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
160 Data, Typeable, Align
165 Data, Typeable, Align
161#if MIN_VERSION_these(0,8,0)
166#if MIN_VERSION_these(0,8,0)
162 , Semialign
167 , Semialign
168+#endif
169+#ifdef MIN_VERSION_semialign
170+#if MIN_VERSION_semialign(1,1,0)
171+ , Zip
172+#endif
163#endif
173#endif
164 )
174 )
165
175
src/Data/IntMap/Monoidal/Strict.hs+10
@@ -151,6 +151,11 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
151import Data.Functor.Classes
151import Data.Functor.Classes
152#endif
152#endif
153import Data.Align
153import Data.Align
154+#ifdef MIN_VERSION_semialign
155+#if MIN_VERSION_semialign(1,1,0)
156+import Data.Zip (Zip)
157+#endif
158+#endif
154
159
155-- | An 'IntMap' with monoidal accumulation
160-- | An 'IntMap' with monoidal accumulation
156newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
161newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
@@ -160,6 +165,11 @@ newtype MonoidalIntMap a = MonoidalIntMap { getMonoidalIntMap :: M.IntMap a }
160 Data, Typeable, Align
165 Data, Typeable, Align
161#if MIN_VERSION_these(0,8,0)
166#if MIN_VERSION_these(0,8,0)
162 , Semialign
167 , Semialign
168+#endif
169+#ifdef MIN_VERSION_semialign
170+#if MIN_VERSION_semialign(1,1,0)
171+ , Zip
172+#endif
163#endif
173#endif
164 )
174 )
165
175
src/Data/Map/Monoidal.hs+10
@@ -151,6 +151,11 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
151import Data.Functor.Classes
151import Data.Functor.Classes
152#endif
152#endif
153import Data.Align
153import Data.Align
154+#ifdef MIN_VERSION_semialign
155+#if MIN_VERSION_semialign(1,1,0)
156+import Data.Zip (Zip)
157+#endif
158+#endif
154
159
155-- | A 'Map' with monoidal accumulation
160-- | A 'Map' with monoidal accumulation
156newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
161newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
@@ -160,6 +165,11 @@ newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
160 , Data, Typeable, Align
165 , Data, Typeable, Align
161#if MIN_VERSION_these(0,8,0)
166#if MIN_VERSION_these(0,8,0)
162 , Semialign
167 , Semialign
168+#endif
169+#ifdef MIN_VERSION_semialign
170+#if MIN_VERSION_semialign(1,1,0)
171+ , Zip
172+#endif
163#endif
173#endif
164 )
174 )
165
175
src/Data/Map/Monoidal/Strict.hs+10
@@ -151,6 +151,11 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
151import Data.Functor.Classes
151import Data.Functor.Classes
152#endif
152#endif
153import Data.Align
153import Data.Align
154+#ifdef MIN_VERSION_semialign
155+#if MIN_VERSION_semialign(1,1,0)
156+import Data.Zip (Zip)
157+#endif
158+#endif
154
159
155-- | A 'Map' with monoidal accumulation
160-- | A 'Map' with monoidal accumulation
156newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
161newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
@@ -160,6 +165,11 @@ newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
160 , Data, Typeable, Align
165 , Data, Typeable, Align
161#if MIN_VERSION_these(0,8,0)
166#if MIN_VERSION_these(0,8,0)
162 , Semialign
167 , Semialign
168+#endif
169+#ifdef MIN_VERSION_semialign
170+#if MIN_VERSION_semialign(1,1,0)
171+ , Zip
172+#endif
163#endif
173#endif
164 )
174 )
165
175