alist 0.1.1.7 → 0.1.2.7
raw patch · 2 files changed
+9/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.AList: instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.AList.AList a)
+ Data.AList: instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.AList.AList a)
Files
- Data/AList.hs +8/−0
- alist.cabal +1/−1
Data/AList.hs view
@@ -2,6 +2,7 @@ import Prelude hiding (sum) import Data.Monoid import Data.Semigroup+import Data.Foldable data AList a = AListTip a | AListAppend (AList a) (AList a)@@ -11,6 +12,12 @@ singleton x = AListTip x append = AListAppend +instance Eq a => Eq (AList a) where+ alist == alist' = toList alist == toList alist'++instance Ord a => Ord (AList a) where+ compare alist alist' = compare (toList alist) (toList alist')+ instance Foldable AList where foldMap f AListEmpty = mempty foldMap f (AListTip a) = f a@@ -28,5 +35,6 @@ mempty = AListEmpty mappend = append +-- this doesn't technically associate instance Semigroup (AList a) where (<>) = append
alist.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.1.1.7+version: 0.1.2.7 -- A short (one-line) description of the package. synopsis: lists with O(1) append