Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a bit queue to implement `alterF` for `Data.Map`. This is fairly competitive with the simple implementation in `Control.Lens.At` even with `Int` keys. For keys that are more expensive to compare, it should be substantially better. In case of extremely large maps that would overflow the bit queue, this falls back to a slower, Yoneda-based, implementation. This code is disabled when the word size is at least 61, as maps with nearly a quadrillion entries seem somewhat unlikely. Add rules to specialize to `Const` and `Identity` functors. Add QuickCheck properties to supplement the unit tests, including ones that should trigger the rewrite rules and ones that should not. Remove some more pre-7.0 junk.
- Loading branch information
Showing
12 changed files
with
684 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,7 @@ module Data.Map.Lazy ( | |
, updateWithKey | ||
, updateLookupWithKey | ||
, alter | ||
, at | ||
, alterF | ||
|
||
-- * Combine | ||
|
||
|
Oops, something went wrong.