git.iko.soy/monoidal-containers
on master help sign in
Derive Align instances
commit72068b58c79c539e5ef14655acbcbdc9fb0c356d authorhololeap <hololeap@gmail.com> dateSat 15 Dec 2018, 15:55 (8 years ago) parentbe91bc5
4 files changed+8−4
monoidal-containers.cabal+2−1 src/Data/HashMap/Monoidal.hs+2−1 src/Data/Map/Monoidal.hs+2−1 src/Data/Map/Monoidal/Strict.hs+2−1
monoidal-containers.cabal+2−1
@@ -47,6 +47,7 @@ library
4747 hashable >= 1.2 && < 1.3,
4848 lens >=4.4 && <5,
4949 newtype >=0.2 && <0.3,
50− semigroups >= 0.18 && < 0.19
50+ semigroups >= 0.18 && < 0.19,
51+ these
5152 hs-source-dirs: src
5253 default-language: Haskell2010
src/Data/HashMap/Monoidal.hs+2−1
@@ -58,11 +58,12 @@ import Data.Hashable.Lifted (Hashable1)
5858#endif
5959import Control.Lens
6060import Control.Newtype
61+import Data.Align
6162
6263-- | A 'HashMap' with monoidal accumulation
6364newtype MonoidalHashMap k a = MonoidalHashMap { getMonoidalHashMap :: M.HashMap k a }
6465 deriving ( Show, Read, Functor, Eq, NFData
65− , Foldable, Traversable, Data, Typeable, Hashable
66+ , Foldable, Traversable, Data, Typeable, Hashable, Align
6667#if MIN_VERSION_unordered_containers(0,2,8)
6768 , Hashable1
6869#endif
src/Data/Map/Monoidal.hs+2−1
@@ -149,13 +149,14 @@ import Data.Aeson(FromJSON, ToJSON, FromJSON1, ToJSON1)
149149#if MIN_VERSION_containers(0,5,9)
150150import Data.Functor.Classes
151151#endif
152+import Data.Align
152153
153154-- | A 'Map' with monoidal accumulation
154155newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
155156 deriving (Show, Read, Functor, Eq, Ord, NFData,
156157 Foldable, Traversable,
157158 FromJSON, ToJSON, FromJSON1, ToJSON1,
158− Data, Typeable)
159+ Data, Typeable, Align)
159160
160161#if MIN_VERSION_containers(0,5,9)
161162deriving 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)
149149#if MIN_VERSION_containers(0,5,9)
150150import Data.Functor.Classes
151151#endif
152+import Data.Align
152153
153154-- | A 'Map' with monoidal accumulation
154155newtype MonoidalMap k a = MonoidalMap { getMonoidalMap :: M.Map k a }
155156 deriving (Show, Read, Functor, Eq, Ord, NFData,
156157 Foldable, Traversable,
157158 FromJSON, ToJSON, FromJSON1, ToJSON1,
158− Data, Typeable)
159+ Data, Typeable, Align)
159160
160161#if MIN_VERSION_containers(0,5,9)
161162deriving instance (Ord k) => Eq1 (MonoidalMap k)