packages feed

list-tries 0.4.1 → 0.4.2

raw patch · 4 files changed

+10/−7 lines, 4 filesdep ~basedep ~template-haskelldep ~test-frameworkPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, template-haskell, test-framework

API changes (from Hackage documentation)

- Data.ListTrie.Base.Map: class Foldable (m k) => Map m k
+ Data.ListTrie.Base.Map: class Foldable (m k) => Map m k where empty = fromList [] singleton k v = insert k v empty doubleton k v = insert k v .: singleton insert = insertWith const insertWith f k v = alter (\ mold -> Just $ case mold of { Nothing -> v Just old -> f v old }) k adjust f = update (Just . f) delete = update (const Nothing) update f = alter (f =<<) unionWith = unionWithKey . const differenceWith = differenceWithKey . const intersectionWith = intersectionWithKey . const map = mapWithKey . const mapWithKey f = snd . mapAccumWithKey (\ _ k v -> ((), f k v)) () mapAccum f = mapAccumWithKey (const . f) mapAccumWithKey f z = second fromList . mapAccumL (\ a (k, v) -> fmap ((,) k) (f a k v)) z . toList filter p = fromList . filter (p . snd) . toList fromList = fromListWith const fromListWith f = foldr (uncurry $ insertWith f) empty serializeToList = toList deserializeFromList = fromList singletonView m = case toList m of { [x] -> Just x _ -> Nothing }
- Data.ListTrie.Base.Map: class Map m k => OrdMap m k
+ Data.ListTrie.Base.Map: class Map m k => OrdMap m k where toAscList = reverse . toDescList toDescList = reverse . toAscList split m k = let (a, _, b) = splitLookup m k in (a, b) minViewWithKey m = case toAscList m of { [] -> (Nothing, m) (x : xs) -> (Just x, fromList xs) } maxViewWithKey m = case toDescList m of { [] -> (Nothing, m) (x : xs) -> (Just x, fromList xs) } findPredecessor m = fst . maxViewWithKey . fst . split m findSuccessor m = fst . minViewWithKey . snd . split m mapAccumAsc f = mapAccumAscWithKey (const . f) mapAccumDesc f = mapAccumDescWithKey (const . f) mapAccumAscWithKey f z = second fromList . mapAccumL (\ a (k, v) -> fmap ((,) k) (f a k v)) z . toAscList mapAccumDescWithKey f z = second fromList . mapAccumL (\ a (k, v) -> fmap ((,) k) (f a k v)) z . toDescList

Files

CHANGELOG.txt view
@@ -1,3 +1,6 @@+2012-05-23, 0.4.2:+	Dependency updates for GHC 7.4, thanks to Anders Kaseorg.+ 2011-03-17, 0.4.1: 	Dependency update and Cabalization of the test executable, thanks to JP 	Moresmau.
Data/ListTrie/Map.hs view
@@ -183,7 +183,7 @@  -- | @O(min(m,s))@. Updates the value at the given key: if the given -- function returns 'Nothing', the value and its associated key are removed; if--- 'Just'@ a@is returned, the old value is replaced with @a@. If the key is+-- 'Just'@ a@ is returned, the old value is replaced with @a@. If the key is -- not a member of the map, the map is unchanged. update :: Map map k        => (a -> Maybe a) -> [k] -> TrieMap map k a -> TrieMap map k a
Data/ListTrie/Patricia/Map.hs view
@@ -199,7 +199,7 @@  -- | @O(min(m,s))@. Updates the value at the given key: if the given -- function returns 'Nothing', the value and its associated key are removed; if--- 'Just'@ a@is returned, the old value is replaced with @a@. If the key is+-- 'Just'@ a@ is returned, the old value is replaced with @a@. If the key is -- not a member of the map, the map is unchanged. update :: Map map k        => (a -> Maybe a) -> [k] -> TrieMap map k a -> TrieMap map k a
list-tries.cabal view
@@ -1,7 +1,7 @@ Cabal-Version: >= 1.6  Name:        list-tries-Version:     0.4.1+Version:     0.4.2 Homepage:    http://iki.fi/matti.niemenmaa/list-tries/ Synopsis:    Tries and Patricia tries: finite sets and maps for list keys Category:    Data, Data Structures@@ -43,7 +43,7 @@ Library    Extensions: CPP -   Build-Depends: base       >= 3   && < 4.4+   Build-Depends: base       >= 3   && < 4.6                 , containers >= 0.3 && < 0.5                 , dlist      >= 0.4 && < 0.6                 , binary     >= 0.5 && < 0.6@@ -81,16 +81,16 @@    hs-source-dirs: ., tests    Extensions: CPP -   Build-Depends: base       >= 3   && < 4.4+   Build-Depends: base       >= 3   && < 4.6                 , containers >= 0.3 && < 0.5                 , dlist      >= 0.4 && < 0.6                 , binary     >= 0.5 && < 0.6     if flag(testing)-     Build-Depends: template-haskell           >= 2.3 && < 2.6+     Build-Depends: template-haskell           >= 2.3 && < 2.8                   , HUnit                      >= 1.2 && < 1.3                   , QuickCheck                 >= 2.1 && < 2.5-                  , test-framework             >= 0.2 && < 0.4+                  , test-framework             >= 0.2 && < 0.6                   , test-framework-hunit       >= 0.2 && < 0.3                   , test-framework-quickcheck2 >= 0.2 && < 0.3                   , ChasingBottoms             >= 1.2 && < 1.4