This project is mirrored from https://github.com/haskell/containers.
Pull mirroring updated .
- Mar 01, 2025
-
-
meooow authored
* Bump version to 0.8 * Update changelog and since annotations * Update cabal.project to allow CI to work
-
- Feb 28, 2025
-
-
meooow authored
Remove Utils.Containers.Internal.TypeError, which is currently unused.
-
- Feb 25, 2025
-
-
meooow authored
* Make module Haddocks largely consistent across Set, Map, IntSet, IntMap, Seq. * Make public module docs for each structure (e.g. Data.Map, Data.Map.Lazy, Data.Map.Strict) have similar structure and content. This means some duplication of text, but there is no way to avoid it. * Trim down internal module Haddocks (e.g. Data.Map.Internal) to a structure description and references. There is no need to repeat everything that's in the public module. * Add a few lines about the complexity of common operations on each set and map structure. In particular, union and intersection are mentioned with a clear description of 'm' and 'n', to reduce the chances that a reader assumes them to be tied to positions and not sizes.
-
meooow authored
Add some useful definitions to Data.Tree: leaves, edges, pathsToRoot, pathsFromRoot, PostOrder.
-
- Feb 24, 2025
-
-
meooow authored
-
- Feb 23, 2025
- Feb 22, 2025
-
-
eyelash authored
-
- Feb 16, 2025
-
-
meooow authored
This is to avoid passing around the visited array in dfs's go. Also add a bang on g, so that dfs is strict in g on non-GHC as it is on GHC.
-
meooow authored
We don't have a good enough reason to expose these modules. They do not offer internals of containers (Set, Map, etc.) and are not required to use other exposed internals. Instead they clutter the modules list and search results.
-
Xia Li-yao authored
-
- Feb 15, 2025
-
-
Xavier Góngora authored
-
- Jan 30, 2025
-
- Jan 26, 2025
-
-
meooow authored
* Fix Sphinx and sphinx-rtd-theme versions and update the code to make it work. * Use sphinx-rtd-theme instead of alabaster. This makes the appearance consistent with GHC and Cabal RTD.
-
- Jan 25, 2025
- Jan 19, 2025
- Jan 18, 2025
- Jan 13, 2025
-
-
meooow authored
Fixes "Config validation error in build.os. Value build not found."
-
- Jan 12, 2025
-
-
meooow authored
For Set and Map, inline the common case of balance, balanceL, balanceR, as explained in the "Inlining balance" note. A decrease in running time of 10-30% is seen in benchmarks for insert, delete, union, and others.
-
- Jan 11, 2025
-
-
Jonathan Knowles authored
* In docs, use "look up" instead of "lookup" when used as a verb. "To look up (a thing)" is a phrasal verb, whereas the single word "lookup" (written without spaces) is generally used as a noun (for example: "in order to avoid an expensive lookup") and occasionally as an adjective (for example: "a lookup table"). Some parts of the documentation already use "look up" in a verbal context. For example, `Data.Map.Internal.hs:1295` models correct usage: ```hs -- Look up a key and return a result indicating whether it was found -- and what path was taken. lookupTrace :: Ord k => k -> Map k a -> TraceResult a ``` This commit adjusts the rest of the documentation (and comments) to match this usage (when "look up" is used as a verb). When "lookup" is used as a noun or an adjective, we leave it alone. This usage of phrasal verbs is similar to: - "pick up" (verb) vs "pickup" (noun) - "sit up" (verb) vs "situp" (noun) - "log in" (verb) vs "login" (noun) - "start up" (verb) vs "startup" (noun) - "set up" (verb) vs "setup" (noun) * In docs, insert the word "the" where it is missing. This commit also replaces "the" with "this" for consistency with documentation for other functions.
-
- Jan 10, 2025
- Jan 05, 2025
-
-
meooow authored
Use "Builder"s to implement some Set and Map construction functions. As a result, some have become good consumers in terms of list fusion, and all are now O(n) for non-decreasing input. Fusible Fusible O(n) for O(n) for before after before after Set.fromList No Yes Strict incr Non-decr Set.map - - Strict incr Non-decr Map.fromList No Yes Strict incr Non-decr Map.fromListWith Yes Yes Never Non-decr Map.fromListWithKey Yes Yes Never Non-decr Map.mapKeys - - Strict incr Non-decr Map.mapKeysWith - - Never Non-decr
-
- Jan 04, 2025
-
-
dbeacham authored
-
meooow authored
* Make fromAscList, fromAscListWith, fromAscListWithKey, fromDescList, fromDescListWith, fromDescListWithKey more efficient by removing the intermediate list and making them good consumers in list fusion. * Update Set's fromAscList and fromDescList to keep the last of duplicates. This makes it consistent with all other fromList functions on Set and Map. * Update fromDistinct{Asc,Desc}List to take 1 arg for consistent inlining behavior.
-
lennart@augustsson.net authored
MicroHs has pattern synonyms now. Also, update CI to use mcabal for building the package.
-
meooow authored
* Make foldr and foldl short-circuit instead of lazily accumulating thunks. * Switch to a non-empty style to avoid unnecessary comparisons. This also helps GHC with arity analysis (somehow), which greatly improves performance of CPS-style foldr and foldl. * Change the bitwise operations used from bitmask = bm .&. -bm; bi = ctz bitmask; bm' = bm `xor` bitmask to bi = ctz bm; bm' = bm .&. (bm-1) which is slightly faster.
-
- Dec 21, 2024
-
-
meooow authored
-
- Dec 20, 2024
-
-
meooow authored
-
- Dec 14, 2024
-
-
meooow authored
Trees constructed from [1..n] have a specific structure of perfect binary trees linked together. We shuffle the list so that the tree is generated from repeated insertions instead, which forms a random structure that should be more representative of average use cases. Most benchmarks show an increase in measured times, the amount varying from 10% to 70%. This is expected because the trees are more unbalanced now. A handful of benchmarks show larger increases. These were previously measuring best-case scenarios, which no longer occur with random trees.
-
- Dec 05, 2024
-
-
meooow authored
* foldr1 and foldl1 are now implemented as coercions. * Other folds were implemented using coercions in a complicated manner, which is now simplified. GHC is smart enough to compile these to the same Core, so there is no change in runtime behavior.
-
meooow authored
This matches the behavior of strict folds on sets and maps.
-
- Nov 30, 2024
-
-
meooow authored
* Add new tests and update existing tests to check against lists. This covers all left and right folds on Set, Map, IntSet, IntMap. * Remove the now unnecessary nothunks dependency.
-
meooow authored
Define a common set of benchmarks for fold functions, usable for all structures - Set, Map, IntSet, IntMap, Seq, Tree.
-