New patches in /srv/darcs/git-mirrors/containers
commit 9d72ff15f739e6ab2633e71fdb366e44c5af8e8a
Merge: d95988c... 76a2b9d...
Author: Milan Straka <[email protected]>
Date: Fri Mar 30 10:08:45 2012 -0700
Merge pull request #10 from batterseapower/master
Add traverseWithKey to Map and IntMap API
commit 76a2b9d97429497fe4f88cc47eb4945ba7eda163
Author: Max Bolingbroke <[email protected]>
Date: Fri Mar 30 14:20:15 2012 +0100
Add traverseWithKey to Map and IntMap API
Proposal reviewed and approved by the libraries list.
Particular thanks goes to Thomas Schilling for his suggestions
regarding how the function should be documented.
commit d95988c2fc7f920b3d6ec2f28166f06ec56be255
Author: Milan Straka <[email protected]>
Date: Wed Mar 14 18:30:43 2012 +0100
Mark Data.Map.(!) as INLINABLE instead of INLINE.
This should have been done in commit 3f798e33. As mentioned in the
commit log, the chain
m ! k = find k m
{-# INLINE (!) #-}
find k m = ...
{-# INLINABLE find #-}
results in find not being specialized at the call site of (!).
commit d4e8b5bd70f87af4463410df3aade72d42d675e0
Author: Paolo Capriotti <[email protected]>
Date: Tue Mar 6 10:57:33 2012 +0000
Update .gitignore.
commit 67b4a057d1e6cfb3cd8f9b1d0f02b71b9302ce31
Author: Milan Straka <[email protected]>
Date: Sun Mar 4 19:22:47 2012 +0100
Improve {Map,IntMap}.fold* tests.
commit 68cc2e86ecc6d57943906a96d99ce2be3958d60f
Author: Milan Straka <[email protected]>
Date: Sun Mar 4 18:54:28 2012 +0100
Fix Data.Sequence warnings.
As GHC HEAD found out, methods deep, node2, node3 were both
INLINE and SPECIALIZE. Make them INLINE only.
Also the -Wwarn option can be removed.
commit 0c5e71cd7d0a76d09dcd6ba3d95c468d70d6d6a9
Author: Milan Straka <[email protected]>
Date: Sun Mar 4 16:29:42 2012 +0100
Improve list fusion.
* Allow fusable methods to be converted back to the original call when
no fusion happens. For that, foldlFB and foldrFB are used, inspired by
mapFB from Prelude.
* Remove RULES for aliases like toList, assocs, elems, just INLINE them.
commit a7d02d55385798a872daf6340fc29c762550d9ac
Author: Milan Straka <[email protected]>
Date: Sun Mar 4 16:26:38 2012 +0100
Improve Int{Set,Map}.fold*.
In the fold definitions, do not call go if the Bin constructor was
matched during the test for negative numbers. Instead, manually inline
that branch of go.
Otherwise GHC optimizer does this for us -- it creates local definition
of that branch of go and calls it. On my machine, it causes >200B growth
of object file, for every fold.
commit c0e28dc571cc0a4bcfab6fd81458758e6061703b
Author: Milan Straka <[email protected]>
Date: Sun Mar 4 16:24:52 2012 +0100
Improve Int{Map,Set}.fold*.
Improve Int{Map,Set}.fold* defitions to be inlinable with
two arguments only.
Otherwise GHC inlined toAscList, toDescList _and after that_ inlined
the fold, resulting in useless code growth.
commit 5d742ef1e4a26ae1c8c9bfa5b2c76031108dc9fb
Author: Milan Straka <[email protected]>
Date: Sun Mar 4 16:23:11 2012 +0100
Improve IntMap.fold*.
Improve IntMap.fold* not to do two checks for negative numbers
-- both prefix and mask were tested. Mask tests are enough.
commit 0aaac529f4c37b88180e6f0e6b8fbc160d09ebc2
Author: Milan Straka <[email protected]>
Date: Sat Mar 3 11:28:18 2012 +0100
Improve {Map,IntMap}.intersection* and its tests.
* Add tests for intersectionWith*.
* Add specific Map.intersection implementation instead of using
Map.intersectionWithKey.
* Refactor Map.intersectionWithKey implementatioin.
commit 69ae2392c426412f58067e91c949d3faed69a619
Author: Milan Straka <[email protected]>
Date: Mon Dec 12 13:08:36 2011 +0100
Add toDescList.
Add toDescList to IntMap, Set and IntSet. Also add
corresponding fusion RULES and tests.
The function is added as community was opposed to removing
toDescList from Map.
commit 079c641cd2a250f77aeed9978b39e4996caddadf
Author: Milan Straka <[email protected]>
Date: Mon Dec 12 12:12:42 2011 +0100
Improve formatting of oneliners.
commit eaa4d342b0510591a2a473aaa54aa8b73dfd744d
Author: Milan Straka <[email protected]>
Date: Wed Dec 7 20:47:48 2011 +0100
Improve tests.
* Test IntMap.mapKeys, mapKeysWith, mapKeysMonotonic, which were just
added.
* Unify map-properties and intmap-properties as possible, by renaming
methods and changing comments, so that they are the same in both.
commit 4ee54fe619c5aba38f4ca3a38a4fc793ce1c759a
Author: Milan Straka <[email protected]>
Date: Wed Dec 7 20:42:10 2011 +0100
Add IntMap.mapKeys* methods.
Add IntMap.mapKeys, mapKeysWith, mapKeysMonotonic.
These functions are present in the Map module and we want IntMap
to be a replacement of Map Int.
The IntMap.mapKeysMonotonic is not as efficient as Map.mapKeysMonotonic
because of the IntMap representation -- the trie structure changes
wildly when the keys changes, even if the ordering of keys is not
altered.
Also, some time complexities were corrected.
commit 7afa9c0b606770927d81a9283885c637fed9c581
Author: Milan Straka <[email protected]>
Date: Wed Dec 7 20:38:57 2011 +0100
Improve performance of Map.mapKeys[With].
We can manually fuse
List.map fFirst . toList
where fFirst (a, b) = (f a, b)
using the right fold as
foldrWithKey (\k x xs -> (f k, x) : xs) []
commit b53359b62f0a182ff4ee33d1173190ac8e3c9c9e
Author: Milan Straka <[email protected]>
Date: Wed Dec 7 20:05:36 2011 +0100
Remove unnecessary methods from Data.Map.Strict.
Remove implementations of mapKeys and mapKeysMonotonic
from Data.Map.Strict module. These methods modify keys only
and even Data.Map.Lazy are strict in keys.
commit 4c0a00252dea5a3eecfddda6cf0bd8d93f2d9561
Author: Milan Straka <[email protected]>
Date: Wed Dec 7 19:54:43 2011 +0100
Generalize IntMap.update{Min,Max}[WithKey].
Previously these methods were given an argument of type
[Key ->] a -> a
Now they are given an argument of type
[Key ->] a -> Maybe a
That makes them compatible with Map counterparts.
commit 0bead5148215b68993952d9173983cdc83135e1a
Author: Milan Straka <[email protected]>
Date: Mon Dec 5 22:33:18 2011 +0100
Unify IntMap.deleteFind{Min,Max} with the Map ...
... counterparts.
The type signature has changed from
IntMap.deleteFind{Min,Max} :: IntMap a -> (a, IntMap a)
to
IntMap.deleteFind{Min,Max} :: IntMap a -> ((Key, a), IntMap a)
.
commit f461aea96e8294a93264fcd09152f2ebef1cd531
Author: Milan Straka <[email protected]>
Date: Mon Dec 5 22:14:46 2011 +0100
Int{Set.Map}.delete{Min,Max} doesn't fail on empty.
Make Int{Map,Set}.delete{Min,Max} behave like {Map,Set}.delete{Min,Max}.
* Old behaviour: Int{Set,Map}.delete{Min,Max} empty ==> error
* New behaviour: Int{Set,Map}.delete{Min,Max} empty == empty
commit 189b16ea02ce82a39f7a572da08b883f5f3c1aad
Author: Milan Straka <[email protected]>
Date: Fri Mar 2 17:48:44 2012 +0100
Disable ropt_plain_output.
The ropt_plain_output was used to disables ansi sequences in the test
log. But it works only for test-framework < 0.5.
In test-framework >= 0.5, ropt_plain_output no longer exists. The line
"ropt_color_mode = Just ColorNever" can be used, but test-framework >= 0.5
detects it is not writing to the terminal and disables ansi sequences by
itself.
It is difficult to compile ropt_plain_output conditionally for
test-framework < 0.5 only (MIN_VERSION_* macros are not defined for
dependencies of tests, conditions in cabal tests do not work for
ghc-7.0). We therefore do not set ropt_plain_output and live with ansi
sequences in test logs produces by test-framework < 0.5.
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc