packages/containers.git
17 months agoAdd minView benchmark for Map
David Feuer [Mon, 8 Jan 2018 22:44:52 +0000 (17:44 -0500)] 
Add minView benchmark for Map

17 months agoFaster stable sort (#492)
Donnacha Oisín Kidney [Sat, 20 Jan 2018 20:56:57 +0000 (20:56 +0000)] 
Faster stable sort (#492)

Use a new, faster implementation for stable sort

The old stable sort simply called Data.List.sort: here, we construct a pairing heap, but tag each element with its original position in the sequence. Then we perform heap sort, the same sort as used in `unstableSort`.

18 months agoMove bitcount to Utils.Internal.BitUtil. (#498)
Matt Renaud [Fri, 19 Jan 2018 16:27:24 +0000 (08:27 -0800)] 
Move bitcount to Utils.Internal.BitUtil. (#498)

Previously this lived in IntSet.Internal and was not exported. This utility
function will be needed by IntSet.Internal, IntSetValidity, and
IntMapValidity. The latter two need it to verify that the mask is a power
of two (the bitcount of the mask == 1).

18 months agoAdd unzips for sequences (#494)
David Feuer [Wed, 17 Jan 2018 09:34:55 +0000 (04:34 -0500)] 
Add unzips for sequences (#494)

* Add `unzip` and `unzipWith` to `Data.Sequence`.

* Make `unzipWith` *actually* avoid certain space leaks by
  ensuring that the result trees are constructed in lock-step.

18 months agoUpdate sitemap to point to https pages.
Matt Renaud [Thu, 11 Jan 2018 23:47:47 +0000 (15:47 -0800)] 
Update sitemap to point to https pages.

[ci skip]

18 months agoAdded notes on skew-heap attempt (#490)
Donnacha Oisín Kidney [Thu, 11 Jan 2018 20:13:41 +0000 (20:13 +0000)] 
Added notes on skew-heap attempt (#490)

* Added notes on skew-heap attempt

* added reference to notes in comments

18 months agoCreate sitemap.xml
Matt Renaud [Thu, 11 Jan 2018 19:58:06 +0000 (11:58 -0800)] 
Create sitemap.xml

[ci skip]

18 months agoVerify site ownership for Google analytics/webmaster tools. (#485)
Matt Renaud [Thu, 11 Jan 2018 19:11:43 +0000 (11:11 -0800)] 
Verify site ownership for Google analytics/webmaster tools. (#485)

[ci skip]

18 months agoFix formatting bug.
Matt Renaud [Thu, 11 Jan 2018 18:53:08 +0000 (10:53 -0800)] 
Fix formatting bug.

[ci skip]

18 months agoAdd "introduction and tutorial" to index header.
Matt Renaud [Thu, 11 Jan 2018 18:47:03 +0000 (10:47 -0800)] 
Add "introduction and tutorial" to index header.

[ci skip]

18 months agoChange syntax for implicit :haddock: autolink. (#484)
Matt Renaud [Thu, 11 Jan 2018 17:33:44 +0000 (09:33 -0800)] 
Change syntax for implicit :haddock: autolink. (#484)

Implicit links must now start with a slash '/'

Before:
  Module        => Not possible
  Module#ident  => current_package/Module#ident

After:
  /Module       => current_package/Module
  /Module#ident => current_package/Module#ident

Previously Module#ident would implicitly link to <package>/Module#ident, but
this prevented implicitly linking to <package>/Module (since its not possible to
differentiate between an explicit Haddock package link or an implicit link
within the current package.

[ci skip]

18 months agoAdd favicon to docs. (#487)
Matt Renaud [Thu, 11 Jan 2018 05:26:07 +0000 (21:26 -0800)] 
Add favicon to docs. (#487)

[ci skip]

18 months agoAdd missing highlight:: haskell annotation
Matt Renaud [Wed, 10 Jan 2018 17:55:20 +0000 (09:55 -0800)] 
Add missing highlight:: haskell annotation

Adding this back in fixes syntax highlighting of Haskell source code.

[ci skip]

18 months agoSmall typo fixes in set docs.
Matt Renaud [Wed, 10 Jan 2018 16:29:09 +0000 (08:29 -0800)] 
Small typo fixes in set docs.

[ci skip]

18 months agoMerge branch 'modrenaud'
David Feuer [Tue, 9 Jan 2018 05:13:08 +0000 (00:13 -0500)] 
Merge branch 'modrenaud'

18 months agoAdd docs for containers package.
Matt Renaud [Fri, 29 Dec 2017 02:19:26 +0000 (18:19 -0800)] 
Add docs for containers package.

- Configuration for ReadTheDocs
- Introduction to the containers package
- API and usage docs for Set, IntSat, Map, IntMap, and Sequence

[ci skip]

18 months agoUpdate CONTRIBUTING.md with Pull Request guidance. (#468)
Matt Renaud [Mon, 8 Jan 2018 20:30:45 +0000 (12:30 -0800)] 
Update CONTRIBUTING.md with Pull Request guidance. (#468)

- Link to the libraries@haskell.org discussion if applicable
- Run benchmarks and include results
- Add unit tests
- Update change log
- Let us know how you would like to be credited

Addresses treeowl@s comment in
https://github.com/haskell/containers/pull/455#issuecomment-353204381.

[ci skip]

18 months agoRework Data.Sequence documentation
David Feuer [Sun, 7 Jan 2018 07:56:49 +0000 (02:56 -0500)] 
Rework Data.Sequence documentation

* Add extended introductory information to the module description.

* Add examples of pattern synonym usage.

* Experimentally switch to proper mathematics for big-O. Hopefully
  people won't complain about the loading speed.

* Tighten the performance bound for `chunksOf`.

18 months agoImprove inference for IsString instance for Seq (#481)
David Feuer [Mon, 8 Jan 2018 05:36:28 +0000 (00:36 -0500)] 
Improve inference for IsString instance for Seq (#481)

When I originally added an `IsString` instance for `Seq`, we
conservatively used

```haskell
instance IsString (Seq Char)
```

to allow for the possibility that we might eventually want to write
additional instances. But the result is very bad inference and
a discrepency with the instance for lists. So let's not do that.

18 months agoUpdate replicateM post-AMP (#480)
David Feuer [Mon, 8 Jan 2018 04:45:52 +0000 (23:45 -0500)] 
Update replicateM post-AMP (#480)

Make `replicateM` a synonym for `replicateA` for `base >= 4.8.0`.

18 months agoMerge pull request #476 from treeowl/sum-product
David Feuer [Mon, 8 Jan 2018 03:26:11 +0000 (22:26 -0500)] 
Merge pull request #476 from treeowl/sum-product

 Add Cartesian products and disjoint unions for Set

18 months agoMark Internal modules not-home (#477)
David Feuer [Sun, 7 Jan 2018 10:29:01 +0000 (05:29 -0500)] 
Mark Internal modules not-home (#477)

Let Haddock know that it shouldn't consider the `Internal` modules
home for any identifiers. This should've been done when I exposed
those internal modules. Whoops.

18 months agoAdd tests for new Set functions
David Feuer [Fri, 5 Jan 2018 06:33:11 +0000 (01:33 -0500)] 
Add tests for new Set functions

Add QuickCheck properties for `cartesianProduct` and
`disjointUnion`.

18 months agoAdd Cartesian products and disjoint unions for Set
Edward Kmett [Fri, 5 Jan 2018 06:26:24 +0000 (01:26 -0500)] 
Add Cartesian products and disjoint unions for Set

Add

  * `cartesianProduct :: Set a -> Set b -> Set (a, b)`
  * `disjointUnion :: Set a -> Set b -> Set (Either a b)`

Fixes #442

18 months agoMerge pull request #474 from treeowl/powerSet
David Feuer [Thu, 4 Jan 2018 07:44:20 +0000 (02:44 -0500)] 
Merge pull request #474 from treeowl/powerSet

Add powerSet to Data.Set

18 months agoAdd a test for Set.powerSet
David Feuer [Wed, 3 Jan 2018 21:12:53 +0000 (16:12 -0500)] 
Add a test for Set.powerSet

18 months agoAdd powerSet to Data.Set
Edward Kmett [Wed, 3 Jan 2018 21:10:55 +0000 (16:10 -0500)] 
Add powerSet to Data.Set

This should be considerably more efficient than what can be written
using the public API because it can glue trees together without
needing to perform a full divide-and-conquer union.

Addresses #442

18 months agoStop hand-unboxing shifts (#471)
David Feuer [Wed, 3 Jan 2018 21:39:01 +0000 (16:39 -0500)] 
Stop hand-unboxing shifts (#471)

We used to unbox shifts manually to make sure things inlined
adequately. Based on my benchmarks, that doesn't seem to be
necessary anymore. The differences are small, and for `IntMap`
benchmarks actually seem to favor doing the simple thing.

18 months agoAdd validity checks for IntSet and IntMap (#456)
Matt Renaud [Sat, 30 Dec 2017 17:08:11 +0000 (09:08 -0800)] 
Add validity checks for IntSet and IntMap (#456)

These checks codify the invariants laid out in the IntSet and IntMap comments. We
add validity checks for constructed IntSets and IntMaps as well as union,
intersection, and difference operations on them.

* Add validity tests for functions producing IntSets/IntMaps.
* Add field comments for IntMap Bin constructor.
* Move validity checks into tests/.

18 months agoAdd stack.yaml file (#463)
Matt Renaud [Thu, 28 Dec 2017 18:27:14 +0000 (10:27 -0800)] 
Add stack.yaml file (#463)

* Add stack.yaml file to containers.

`stack setup` fails due to ChasingBottoms missing from Stackage

We default to lts-9.20 because lts-10.0 is currently not supported by many
development tools (such as intero) because ghc-mod does not yet support GHC
8.2 (https://github.com/DanielG/ghc-mod/issues/900).

This was tested and works with resolvers lts-10.0 and lts-9.20.

Using older resolvers <=lts-7.24 causes a conflict with the package ranges
specified in containers.cabal.

* Remove `stack init` step in CONTRIBUTING.md.

18 months agoUpdate CONTRIBUTING.md with benchmark instructions (#461)
Matt Renaud [Tue, 26 Dec 2017 04:57:24 +0000 (20:57 -0800)] 
Update CONTRIBUTING.md with benchmark instructions (#461)

This includes instructions for building and running benchmarks with both cabal-install and stack.

18 months agoAdd MonadFix instance for Data.Tree (#451)
David Feuer [Sat, 23 Dec 2017 05:52:13 +0000 (00:52 -0500)] 
Add MonadFix instance for Data.Tree (#451)

* Add a `MonadFix` instance for `Tree`. This is based on an instance for
  a somewhat more general type by G. Allais.
  See [MonadTree.hs](https://gist.github.com/gallais/4c59b949c743c0a85cab55dcb73aaf7c).

* Make `>>=` for `Tree` stricter. Previously, it was too lazy to satisfy the
  `Monad` laws, and that laziness was not particularly valuable.

* Add a small test suite for `Tree`. The `Arbitrary` instance is mediocre,
  and so is the `MonadFix` test, but something definitely seems better than
  nothing!

* Bump QuickCheck version to 2.7.1 for `genericShrink`.

Fixes #452

18 months agoImprove error message for `index` (#457)
Matt Renaud [Fri, 22 Dec 2017 17:10:30 +0000 (09:10 -0800)] 
Improve error message for `index` (#457)

* Improve error message for `index`

When the index is out of bounds mention which function is causing the error. We include the index `i` in the error message because it may be useful in debugging (-1 vs large number could narrow down where to look).

This was originally mentioned in https://github.com/haskell/containers/issues/347.

* Specify `Data.Sequence.index` in error message.

18 months agoAdd operator IntMap.!?. (#454)
Matt Renaud [Wed, 20 Dec 2017 22:56:24 +0000 (14:56 -0800)] 
Add operator IntMap.!?. (#454)

Add operator `IntMap.!?`.

This operator was added to `Data.Map` but was accidentally left out of the `IntMap`
API.

```haskell
(!?) :: IntMap a -> Key -> Maybe a
```

Fixes #453

* Add missing import of operator (!?) from internal module.

* Add operator !? property tests to test list.

* Fix precedence issue in properties test.

* Add @since 0.5.11 annotation to Data.IntMap.!?.

* Use Prelude.map instead of <$> in intmap-properties.

<$> was not introduced into base until GHC 7.10 so integration tests run against
earlier compilers fail[1]. We go with Prelude.map since it is the simplest way
to be compatible with all GHC versions.

Alternatives considered:
  - import Data.Functor ((<$>)) or fmap
    - causes unused import warnings for GHC versions with <$> in base.
  - conditionally import <$>
    - Unnecessary noise in compile list.

[1]
https://travis-ci.org/haskell/containers/builds/318987347?utm_source=github_status&utm_medium=notification

18 months agoCreate CONTRIBUTING.md (#455)
Matt Renaud [Wed, 20 Dec 2017 22:37:40 +0000 (14:37 -0800)] 
Create CONTRIBUTING.md (#455)

Create CONTRIBUTING.md

19 months agoUpdate changelog
David Feuer [Mon, 18 Dec 2017 20:06:12 +0000 (15:06 -0500)] 
Update changelog

19 months agoAdd @since-annotations (#447)
Simon Jakobi [Mon, 18 Dec 2017 19:13:06 +0000 (20:13 +0100)] 
Add @since-annotations (#447)

* Add @since-annotations for v0.5.9.1

* Add @since-annotations for v0.5.8

* Add @since-annotations for v0.5.7

* Add @since-annotations for v0.5.6.2

* Add @since-annotations for v0.5.4

This change doesn't add annotations for the Typeable[0-2] instances that the
changelog claims were added in v0.5.4.0 as haddocks on Hackage show the same
instances for earlier versions like v0.4.0.0.

* Add @since-annotions for the Data.IntMap.Merge additions in v0.5.9

NB the change on the annotations for `merge` and `mergeA`.

* Add annotations for the contents of Data.Map.Merge.*

19 months agoMerge pull request #348 from benjamin-hodgson/mapKeysWith-docs
David Feuer [Mon, 18 Dec 2017 18:01:31 +0000 (13:01 -0500)] 
Merge pull request #348 from benjamin-hodgson/mapKeysWith-docs

Improve documentation of mapKeysWith

19 months agoMerge pull request #431 from phadej/restrictKeys-example
David Feuer [Mon, 18 Dec 2017 17:58:01 +0000 (12:58 -0500)] 
Merge pull request #431 from phadej/restrictKeys-example

Add restictKeys example via intersect, also withoutKeys

19 months agoMerge pull request #444 from RyanGlScott/missing-home-modules
David Feuer [Mon, 18 Dec 2017 14:30:00 +0000 (09:30 -0500)] 
Merge pull request #444 from RyanGlScott/missing-home-modules

Fix -Wmissing-home-modules warnings

19 months agoFix -Wmissing-home-modules warnings
Ryan Scott [Wed, 6 Dec 2017 14:34:25 +0000 (09:34 -0500)] 
Fix -Wmissing-home-modules warnings

Fixes #434.

19 months agoMerge pull request #432 from RyanGlScott/master
David Feuer [Mon, 18 Dec 2017 05:59:41 +0000 (00:59 -0500)] 
Merge pull request #432 from RyanGlScott/master

Expose Size (and other Int aliases) from *.Internal modules

19 months agoIntMap lookupMin and lookupMax (#437)
bwroga [Mon, 18 Dec 2017 05:53:06 +0000 (00:53 -0500)] 
IntMap lookupMin and lookupMax (#437)

Add `lookupMin` and `lookupMax` to `Data.IntMap` to match the ones in `Data.Map`.

19 months agoMerge pull request #448 from sjakobi/travis
David Feuer [Mon, 18 Dec 2017 05:41:27 +0000 (00:41 -0500)] 
Merge pull request #448 from sjakobi/travis

Travis: Add a GHC-8.2 job

19 months agoAdd a MonadFix instance for Seq (#449)
David Feuer [Mon, 18 Dec 2017 05:10:39 +0000 (00:10 -0500)] 
Add a MonadFix instance for Seq (#449)

19 months agoTravis: Add a GHC-8.2 job
Simon Jakobi [Sun, 17 Dec 2017 13:32:50 +0000 (14:32 +0100)] 
Travis: Add a GHC-8.2 job

21 months agoMake compatible with upcoming Prelude.<> export in GHC 8.4/base-4.11 (#438)
Herbert Valerio Riedel [Thu, 21 Sep 2017 20:14:46 +0000 (22:14 +0200)] 
Make compatible with upcoming Prelude.<> export in GHC 8.4/base-4.11 (#438)

22 months agoExpose Size (and other Int aliases) from *.Internal modules
Ryan Scott [Tue, 22 Aug 2017 13:25:57 +0000 (09:25 -0400)] 
Expose Size (and other Int aliases) from *.Internal modules

23 months agoAdd restictKeys example via intersect, also withoutKeys
Oleg Grenrus [Fri, 18 Aug 2017 16:50:53 +0000 (19:50 +0300)] 
Add restictKeys example via intersect, also withoutKeys

2 years agoSpeeding up unstableSort (#425)
Donnacha Oisín Kidney [Tue, 2 May 2017 00:58:31 +0000 (01:58 +0100)] 
Speeding up unstableSort (#425)

* Trying out quicker sort - pairing, with state

* Specialise pragmas for queue-state

* Put back sequence benchmarks; put sorting benchmarks in own file

* Correct queuestate type

* Both versions use same state now

* Added benchmarks for strictly increasing sequences

* Remove implementation with intermediate list - let's look at other optimisations now

* Formatting of pqState

* Changed pqState -> popMin

* Removed duplicate functions

* Benchmarks include stable sort

* Now compares to stable sort in benchmarks

* Added comments

* Put benchmarks in with other sequence benchmarks

* Added note on replicate specialisation

* Stopped using pattern synonym in unstableSortBy

2 years agoUpdate changelog
David Feuer [Sat, 1 Apr 2017 16:01:22 +0000 (12:01 -0400)] 
Update changelog

2 years agoMerge pull request #421 from mikeplus64/master
David Feuer [Sat, 1 Apr 2017 15:54:08 +0000 (11:54 -0400)] 
Merge pull request #421 from mikeplus64/master

faster {IntMap,IntSet} size functions

2 years agoquickcheck size using foldl for intset
Mike Ledger [Wed, 29 Mar 2017 06:09:07 +0000 (17:09 +1100)] 
quickcheck size using foldl for intset

2 years agoquickcheck size for intmap
Mike Ledger [Wed, 29 Mar 2017 06:08:57 +0000 (17:08 +1100)] 
quickcheck size for intmap

2 years agofaster IntSet.size
Mike Ledger [Wed, 29 Mar 2017 04:35:47 +0000 (15:35 +1100)] 
faster IntSet.size

2 years agofaster IntMap.size
Mike Ledger [Wed, 29 Mar 2017 04:34:20 +0000 (15:34 +1100)] 
faster IntMap.size

2 years agoAdd COMPLETE pragmas for Data.Sequence
David Feuer [Wed, 1 Mar 2017 02:52:36 +0000 (21:52 -0500)] 
Add COMPLETE pragmas for Data.Sequence

GHC 8.2 allows us to declare sets of pattern synonyms complete.
We happily do so!

2 years agoFix unused pattern match warnings (#418)
Ben Gamari [Tue, 28 Feb 2017 18:56:58 +0000 (13:56 -0500)] 
Fix unused pattern match warnings (#418)

2 years agoDefeat worker/wrapper in insertR too (#417)
David Feuer [Fri, 24 Feb 2017 17:51:11 +0000 (12:51 -0500)] 
Defeat worker/wrapper in insertR too (#417)

2 years agoFix insert worker/wrapper issues (#416)
David Feuer [Wed, 22 Feb 2017 21:56:49 +0000 (16:56 -0500)] 
Fix insert worker/wrapper issues (#416)

The new pointer equality version of `insert` in `Data.Map` led to
a severe regression in the `last-piece` benchmark of `nofib`.
It turned out that worker/wrapper was doing absolutely horrible
things to `insert`, breaking the pointer equality tests and
also leading to completely unnecessary allocation. This commit
adds horrible hacks that seem to prevent this from happening.

2 years agoUpdate changelog.md
David Feuer [Tue, 21 Feb 2017 05:10:07 +0000 (00:10 -0500)] 
Update changelog.md

2 years agoFix up IntMap showTree deprecation story (#413)
David Feuer [Tue, 21 Feb 2017 05:08:52 +0000 (00:08 -0500)] 
Fix up IntMap showTree deprecation story (#413)

Export deprecated copies from the places we don't want them,
and non-deprecated originals from internal places we do
want them. This allows the test suite to run without warnings,
and gives users a way to avoid them when using these functions.

2 years agoFix lots of strictness bugs (#412)
David Feuer [Tue, 21 Feb 2017 04:01:00 +0000 (23:01 -0500)] 
Fix lots of strictness bugs (#412)

* `Data.IntMap.Strict` previously re-exported the lazy `traverseWithKey`.
  Implement a strict one.

* `Data.IntMap.Strict` and `Data.Map.Strict` previously had a number of
  rewrite rules with strictness bugs. Remove `map/coerce` rules from
  each and fix the other rules.

2 years agoEscape slashes in Haddock
David Feuer [Mon, 20 Feb 2017 20:55:51 +0000 (15:55 -0500)] 
Escape slashes in Haddock

Fixes #388

2 years agoMerge pull request #411 from haskell/revert-410-revert-408-bugfix_394
wren romano [Mon, 20 Feb 2017 19:14:55 +0000 (11:14 -0800)] 
Merge pull request #411 from haskell/revert-410-revert-408-bugfix_394

Revert "Revert "Optimize IntMap's withoutKeys", in order to squash things first (I hope)"

2 years agoRevert "Revert "Optimize IntMap's withoutKeys", in order to squash things first ...
wren romano [Mon, 20 Feb 2017 19:14:37 +0000 (11:14 -0800)] 
Revert "Revert "Optimize IntMap's withoutKeys", in order to squash things first (I hope)"

2 years agoMerge pull request #410 from haskell/revert-408-bugfix_394
wren romano [Mon, 20 Feb 2017 19:12:37 +0000 (11:12 -0800)] 
Merge pull request #410 from haskell/revert-408-bugfix_394

Revert "Optimize IntMap's withoutKeys", in order to squash things first (I hope)

2 years agoRevert "Optimize IntMap's withoutKeys"
wren romano [Mon, 20 Feb 2017 19:12:14 +0000 (11:12 -0800)] 
Revert "Optimize IntMap's withoutKeys"

2 years agoMerge pull request #408 from wrengr/bugfix_394
wren romano [Mon, 20 Feb 2017 18:33:59 +0000 (10:33 -0800)] 
Merge pull request #408 from wrengr/bugfix_394

Optimize IntMap's withoutKeys

2 years agoMerge branch 'master' into bugfix_394
wren romano [Mon, 20 Feb 2017 17:46:29 +0000 (09:46 -0800)] 
Merge branch 'master' into bugfix_394

2 years agoUpdated withoutKeys to work efficiently
wren romano [Mon, 20 Feb 2017 17:31:20 +0000 (09:31 -0800)] 
Updated withoutKeys to work efficiently

2 years agoBump version; update changelog
David Feuer [Mon, 20 Feb 2017 05:44:12 +0000 (00:44 -0500)] 
Bump version; update changelog

2 years agoOptimize withoutKeys and restrictKeys for IntMap (#400)
wren romano [Mon, 20 Feb 2017 05:39:42 +0000 (21:39 -0800)] 
Optimize withoutKeys and restrictKeys for IntMap (#400)

* Optimized IntMap's withoutKeys

* Optimized IntMap's restrictKeys

* Defined lookupPrefix as part of optimizing restrictKeys

2 years agocleaning up
wren romano [Fri, 17 Feb 2017 02:07:29 +0000 (18:07 -0800)] 
cleaning up

2 years agoFinally fixed restrictBM!
wren romano [Fri, 17 Feb 2017 01:51:16 +0000 (17:51 -0800)] 
Finally fixed restrictBM!

2 years agocommenting out bitmapForBin for now, so things work.
wren romano [Thu, 16 Feb 2017 07:07:59 +0000 (23:07 -0800)] 
commenting out bitmapForBin for now, so things work.

2 years agogreatly improved restrictBM. bitmapForBin is still buggy though.
wren romano [Thu, 16 Feb 2017 07:04:17 +0000 (23:04 -0800)] 
greatly improved restrictBM. bitmapForBin is still buggy though.

2 years agofloated out bitmapForBin from restrictKeys
wren romano [Tue, 14 Feb 2017 05:56:22 +0000 (21:56 -0800)] 
floated out bitmapForBin from restrictKeys

The previous version only appeared non-buggy because we forgot a
prime mark on @bm@ when calling `restrictBM`. This version is buggy
because it corrects that oversight.

2 years agoenhanced the bitmap restriction in restrictKeys to also mask out too-large keys
wren romano [Tue, 14 Feb 2017 05:23:59 +0000 (21:23 -0800)] 
enhanced the bitmap restriction in restrictKeys to also mask out too-large keys

2 years agoFixed the restrictKeys optimization!
wren romano [Tue, 14 Feb 2017 04:46:59 +0000 (20:46 -0800)] 
Fixed the restrictKeys optimization!

2 years agoreverted buggy optimization
wren romano [Tue, 14 Feb 2017 04:29:24 +0000 (20:29 -0800)] 
reverted buggy optimization

2 years agoliftA2 update for Data.Map and Data.IntMap (#403)
David Feuer [Thu, 9 Feb 2017 23:19:26 +0000 (18:19 -0500)] 
liftA2 update for Data.Map and Data.IntMap (#403)

* liftA2 update for `Data.Map` and `Data.IntMap`.

* Changelog update and fixes.

2 years agoimproved the call to restrictBM by pruning the BitMap first
wren romano [Thu, 9 Feb 2017 06:44:41 +0000 (22:44 -0800)] 
improved the call to restrictBM by pruning the BitMap first

2 years agodefined lookupPrefix as part of optimizing restrictKeys
wren romano [Thu, 9 Feb 2017 06:09:06 +0000 (22:09 -0800)] 
defined lookupPrefix as part of optimizing restrictKeys

2 years agoAdding comments, and un-nesting restrictBM and withoutBM
wren romano [Thu, 9 Feb 2017 03:29:56 +0000 (19:29 -0800)] 
Adding comments, and un-nesting restrictBM and withoutBM

The un-nesting is to guarantee that we don't accidentally close over
things.

2 years agoFixed the bugs in restrictKeys/withoutKeys
wren romano [Thu, 9 Feb 2017 03:04:28 +0000 (19:04 -0800)] 
Fixed the bugs in restrictKeys/withoutKeys

2 years agoLiftA2 some more, etc. (#399)
David Feuer [Thu, 9 Feb 2017 01:31:33 +0000 (20:31 -0500)] 
LiftA2 some more, etc. (#399)

* Define custom `<$`, `liftA2`, `<*`, and `*>` for `Data.Tree`.

* Use `liftA2` as appropriate in `Data.Tree` and `Data.Graph`.

2 years agoOptimized IntMap's restrictKeys
wren romano [Thu, 9 Feb 2017 01:03:44 +0000 (17:03 -0800)] 
Optimized IntMap's restrictKeys

2 years agoAdd ap/fmap2 rule for sequences
David Feuer [Wed, 8 Feb 2017 19:47:26 +0000 (14:47 -0500)] 
Add ap/fmap2 rule for sequences

2 years agoliftA2 traverse seq (#398)
David Feuer [Wed, 8 Feb 2017 18:22:38 +0000 (13:22 -0500)] 
liftA2 traverse seq (#398)

* Use a custom `liftA2` implementation for Data.Sequence for
  base 4.10.

* Write RULES for `liftA2`.

* Use liftA2 where reasonable in Data.Sequence

* Use `liftA2` for `Traversable`, etc.

* Scrap `deep'`, `node2'`, and `node3'`. These should no longer
be necessary as GHC now inlines unsaturated wrappers.

2 years agoWrite a liftA2 for Seq (#397)
David Feuer [Wed, 8 Feb 2017 18:21:22 +0000 (13:21 -0500)] 
Write a liftA2 for Seq (#397)

* Use a custom `liftA2` implementation for Data.Sequence for
  base 4.10.

* Write RULES for `liftA2`.

2 years agoOptimized IntMap's withoutKeys
wren romano [Wed, 8 Feb 2017 06:38:58 +0000 (22:38 -0800)] 
Optimized IntMap's withoutKeys

2 years agoUpdate changelog and version v0.5.10.1
David Feuer [Mon, 6 Feb 2017 21:36:25 +0000 (16:36 -0500)] 
Update changelog and version

I realized we need a new minor version because we've added
an instance. Whoops! Fix up the changelog some more.

2 years agoBump version
David Feuer [Mon, 6 Feb 2017 21:18:14 +0000 (16:18 -0500)] 
Bump version

2 years agoUpdate changelog
David Feuer [Mon, 6 Feb 2017 21:17:34 +0000 (16:17 -0500)] 
Update changelog

2 years agoFix buggy restrictKeys and withoutKeys (#393)
David Feuer [Mon, 6 Feb 2017 21:07:33 +0000 (16:07 -0500)] 
Fix buggy restrictKeys and withoutKeys (#393)

`restrictKeys` and `withoutKeys` for `Data.IntMap` were completely
wrong. The QuickCheck properties that should have caught this were
never actually run.

* Fix the implementations

* Make the tests actually run.

Fixes #392

2 years agoRemove 'stability' annotations
Simon Jakobi [Wed, 1 Feb 2017 20:35:24 +0000 (21:35 +0100)] 
Remove 'stability' annotations

Fixes https://github.com/haskell/containers/issues/389.

2 years agoRetarget Haddocks to point to new merge modules (#384)
David Feuer [Wed, 11 Jan 2017 03:01:19 +0000 (22:01 -0500)] 
Retarget Haddocks to point to new merge modules (#384)

We had a bunch of stale links to `Strict.Merge` and `Lazy.Merge`.
Fix them all, hopefully.

2 years agoMerge pull request #381 from RyanGlScott/master
David Feuer [Sun, 8 Jan 2017 06:59:02 +0000 (01:59 -0500)] 
Merge pull request #381 from RyanGlScott/master

Fix Read1 and Show1 instances for Tree

2 years agoFix Read1 and Show1 instance for Tree
Ryan Scott [Sun, 8 Jan 2017 03:34:32 +0000 (22:34 -0500)] 
Fix Read1 and Show1 instance for Tree