git.iko.soy/monoidal-containers
on master help sign in
Merge pull request #33 from hololeap/master
3f19bb4Ben Gamari
monoidal-containers.cabal+2−1
@@ -47,6 +47,7 @@ library
47 hashable >= 1.2 && < 1.3,
47 hashable >= 1.2 && < 1.3,
48 lens >=4.4 && <5,
48 lens >=4.4 && <5,
49 newtype >=0.2 && <0.3,
49 newtype >=0.2 && <0.3,
50− semigroups >= 0.18 && < 0.19
50+ semigroups >= 0.18 && < 0.19,
51+ these
51 hs-source-dirs: src
52 hs-source-dirs: src
52 default-language: Haskell2010
53 default-language: Haskell2010
src/Data/HashMap/Monoidal.hs+2−1
@@ -58,11 +58,12 @@ import Data.Hashable.Lifted (Hashable1)
58#endif
58#endif
59import Control.Lens
59import Control.Lens
60import Control.Newtype
60import Control.Newtype
61+import Data.Align
61
62
62-- | A 'HashMap' with monoidal accumulation
63-- | A 'HashMap' with monoidal accumulation
63newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap k a }
64newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap k a }
64 deriving ( Show, Read, Functor, Eq, NFData
65 deriving ( Show, Read, Functor, Eq, NFData
65− , Foldable, Traversable, Data, Typeable, Hashable
66+ , Foldable, Traversable, Data, Typeable, Hashable, Align
66#if MIN_VERSION_unordered_containers(0,2,8)
67#if MIN_VERSION_unordered_containers(0,2,8)
67 , Hashable1
68 , Hashable1
68#endif
69#endif
src/Data/Map/Monoidal.hs+2−1
@@ -149,13 +149,14 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
149#if MIN_VERSION_containers(0,5,9)
149#if MIN_VERSION_containers(0,5,9)
150import Data.Functor.Classes
150import Data.Functor.Classes
151#endif
151#endif
152+import Data.Align
152
153
153-- | A 'Map' with monoidal accumulation
154-- | A 'Map' with monoidal accumulation
154newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
155newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
155 deriving (Show, Read, Functor, Eq, Ord, NFData,
156 deriving (Show, Read, Functor, Eq, Ord, NFData,
156 Foldable, Traversable,
157 Foldable, Traversable,
157 FromJSON, ToJSON, FromJSON1, ToJSON1,
158 FromJSON, ToJSON, FromJSON1, ToJSON1,
158− Data, Typeable)
159+ Data, Typeable, Align)
159
160
160#if MIN_VERSION_containers(0,5,9)
161#if MIN_VERSION_containers(0,5,9)
161deriving instance (Ord k) => Eq1 (MonoidalMap k)
162deriving instance (Ord k) => Eq1 (MonoidalMap k)
src/Data/Map/Monoidal/Strict.hs+2−1
@@ -149,13 +149,14 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
149#if MIN_VERSION_containers(0,5,9)
149#if MIN_VERSION_containers(0,5,9)
150import Data.Functor.Classes
150import Data.Functor.Classes
151#endif
151#endif
152+import Data.Align
152
153
153-- | A 'Map' with monoidal accumulation
154-- | A 'Map' with monoidal accumulation
154newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
155newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
155 deriving (Show, Read, Functor, Eq, Ord, NFData,
156 deriving (Show, Read, Functor, Eq, Ord, NFData,
156 Foldable, Traversable,
157 Foldable, Traversable,
157 FromJSON, ToJSON, FromJSON1, ToJSON1,
158 FromJSON, ToJSON, FromJSON1, ToJSON1,
158− Data, Typeable)
159+ Data, Typeable, Align)
159
160
160#if MIN_VERSION_containers(0,5,9)
161#if MIN_VERSION_containers(0,5,9)
161deriving instance (Ord k) => Eq1 (MonoidalMap k)
162deriving instance (Ord k) => Eq1 (MonoidalMap k)