packages/containers.git
3 years agoMerge pull request #205 from treeowl/bang-intmap
David Feuer [Tue, 26 Apr 2016 03:43:14 +0000 (23:43 -0400)] 
Merge pull request #205 from treeowl/bang-intmap

Use BangPatterns to reduce clutter in Data.IntMap

3 years agoUse BangPatterns to reduce clutter in Data.IntMap
David Feuer [Tue, 26 Apr 2016 00:41:01 +0000 (20:41 -0400)] 
Use BangPatterns to reduce clutter in Data.IntMap

3 years agoMerge pull request #204 from treeowl/bang-set
David Feuer [Tue, 26 Apr 2016 00:24:30 +0000 (20:24 -0400)] 
Merge pull request #204 from treeowl/bang-set

Use bang patterns to reduce clutter in Data.Set

3 years agoUse bang patterns to reduce clutter in Data.Set
David Feuer [Mon, 25 Apr 2016 20:25:05 +0000 (16:25 -0400)] 
Use bang patterns to reduce clutter in Data.Set

3 years agoMerge pull request #203 from treeowl/bang-map
David Feuer [Mon, 25 Apr 2016 20:17:47 +0000 (16:17 -0400)] 
Merge pull request #203 from treeowl/bang-map

Use bang patterns to reduce clutter in Data.Map

3 years agoUse bang patterns to reduce clutter in Data.Map
David Feuer [Mon, 25 Apr 2016 19:22:23 +0000 (15:22 -0400)] 
Use bang patterns to reduce clutter in Data.Map

3 years agoAdd missing changelog info
David Feuer [Mon, 25 Apr 2016 12:26:25 +0000 (08:26 -0400)] 
Add missing changelog info

3 years agoFix silly changelog mistake
David Feuer [Mon, 25 Apr 2016 12:22:37 +0000 (08:22 -0400)] 
Fix silly changelog mistake

3 years agoMerge pull request #202 from treeowl/bang-sequences
David Feuer [Mon, 25 Apr 2016 04:31:16 +0000 (00:31 -0400)] 
Merge pull request #202 from treeowl/bang-sequences

Use bang patterns for Data.Sequence; avoid boxing

3 years agoAdd benchmarks
David Feuer [Mon, 25 Apr 2016 04:11:42 +0000 (00:11 -0400)] 
Add benchmarks

Add replicateA, traverse, and traverseWithIndex benchmarks.

3 years agoUse bang patterns for Data.Sequence; unbox
David Feuer [Sun, 24 Apr 2016 23:43:50 +0000 (19:43 -0400)] 
Use bang patterns for Data.Sequence; unbox

Use `BangPatterns` to reduce clutter in `Data.Sequence`.

When partially applying a `Deep`, `Node2`, or `Node3`
constructor in `traverse`, `traverseWithIndex`, and
`applicativeTree`, avoid boxing up the size argument.

3 years agoMerge pull request #121 from treeowl/intersperse
David Feuer [Fri, 22 Apr 2016 07:07:40 +0000 (03:07 -0400)] 
Merge pull request #121 from treeowl/intersperse

Add intersperse for sequences

3 years agoAdd intersperse for Seq
David Feuer [Sun, 28 Dec 2014 02:09:28 +0000 (21:09 -0500)] 
Add intersperse for Seq

`intersperse` is just like the one in `Data.List`. It is
implemented using `<**>` for optimal performance.

3 years agoMerge pull request #197 from haskell/revert-184-generic
David Feuer [Fri, 22 Apr 2016 06:02:24 +0000 (02:02 -0400)] 
Merge pull request #197 from haskell/revert-184-generic

Revert "add Generics instance for Map, Set, IntMap, and IntSet"

3 years agoMerge pull request #200 from treeowl/generic-tree
David Feuer [Fri, 22 Apr 2016 06:01:44 +0000 (02:01 -0400)] 
Merge pull request #200 from treeowl/generic-tree

Derive Generic and Generic1 for Data.Tree

3 years agoDerive Generic and Generic1 for Data.Tree
David Feuer [Fri, 22 Apr 2016 02:27:33 +0000 (22:27 -0400)] 
Derive Generic and Generic1 for Data.Tree

Unlike the other container types, `Data.Tree.Tree` is fully
exposed. Therefore, we can and should derive `Generic` and
`Generic1` instances for it.

3 years agoRevert "add Generics instance for Map, Set, IntMap, and IntSet" revert-184-generic
David Feuer [Thu, 21 Apr 2016 18:42:42 +0000 (14:42 -0400)] 
Revert "add Generics instance for Map, Set, IntMap, and IntSet"

3 years agoMerge pull request #196 from treeowl/changelog-patterns
David Feuer [Thu, 21 Apr 2016 17:42:09 +0000 (13:42 -0400)] 
Merge pull request #196 from treeowl/changelog-patterns

Add changelog entry for sequence pattern synonyms

3 years agoAdd changelog entry for sequence pattern synonyms
David Feuer [Thu, 21 Apr 2016 17:37:35 +0000 (13:37 -0400)] 
Add changelog entry for sequence pattern synonyms

3 years agoMerge pull request #194 from treeowl/sequence-patterns
David Feuer [Thu, 21 Apr 2016 02:33:47 +0000 (22:33 -0400)] 
Merge pull request #194 from treeowl/sequence-patterns

Sequence pattern synonyms

3 years agoAdd pattern synonyms for sequences
David Feuer [Thu, 21 Apr 2016 01:35:17 +0000 (21:35 -0400)] 
Add pattern synonyms for sequences

Allow `Seq` to be matched with `Empty`, `:<|`, and `:|>`.
Unfortunately, there's quite a lot of CPP noise resulting
from various developments in pattern synonyms in different
versions. Also unfortunately, there's not yet any way to
let GHC know that matching on `Empty` and `:<|`, or on
`Empty` and `:|>`, will be exhaustive.

3 years agoRename Empty constructor to EmptyT
David Feuer [Wed, 20 Apr 2016 23:03:59 +0000 (19:03 -0400)] 
Rename Empty constructor to EmptyT

`Empty` will be a pattern synonym. To avoid confusion and
an extra module, move the actual `FingerTree` constructor
out of the way.

3 years agoMerge pull request #193 from fpco/176-better-seq-filter
Milan Straka [Thu, 31 Mar 2016 18:57:09 +0000 (20:57 +0200)] 
Merge pull request #193 from fpco/176-better-seq-filter

Fix performance of Data.Sequence.filter (fixes #176)

3 years agoFix performance of Data.Sequence.filter (fixes #176)
Michael Snoyman [Thu, 31 Mar 2016 17:16:56 +0000 (20:16 +0300)] 
Fix performance of Data.Sequence.filter (fixes #176)

3 years agoMerge pull request #191 from monkey-mas/remove-wrong-document-related-to-bounded...
Milan Straka [Mon, 21 Mar 2016 12:44:01 +0000 (13:44 +0100)] 
Merge pull request #191 from monkey-mas/remove-wrong-document-related-to-bounded-balance-tree

Remove wrong document in {Set, Map}.hs related to key comparison

3 years agoRemove wrong document in {Set, Map}.hs related to key comparison
Masaru Nomura [Mon, 21 Mar 2016 08:56:07 +0000 (17:56 +0900)] 
Remove wrong document in {Set, Map}.hs related to key comparison

As we no longer use (<=) comparison but use (<) comparison instead
since this commit[1], the document is not correct to explain the current implementation.

[1] https://github.com/haskell/containers/commit/4193a09336772748bdec0cdab5da4257d224c814

3 years agoMerge pull request #184 from kuk0/generic
Milan Straka [Fri, 19 Feb 2016 12:30:41 +0000 (13:30 +0100)] 
Merge pull request #184 from kuk0/generic

add Generics instance for Map, Set, IntMap, and IntSet

3 years agoadd Generics instance for Map, Set, IntMap, and IntSet
Kubo Kovac [Thu, 18 Feb 2016 17:21:57 +0000 (17:21 +0000)] 
add Generics instance for Map, Set, IntMap, and IntSet

we want Generics for everything (otherwise we can't derive Generics
for any data types which contain these without creating orphan
instances)

3 years agoMerge pull request #183 from thomie/ghc-tests
Milan Straka [Wed, 17 Feb 2016 12:58:06 +0000 (13:58 +0100)] 
Merge pull request #183 from thomie/ghc-tests

Delete tests-ghc

3 years agoDelete tests-ghc
Thomas Miedema [Wed, 10 Feb 2016 21:39:28 +0000 (22:39 +0100)] 
Delete tests-ghc

`containers` received its own testsuite in
38743e394dd19fcd7983a1f726482d04e64111ec (2010). That commit mentions:

    "It includes unit tests for known past bugs (balancing)."

I think it's safe to delete the old ghc tests.

3 years agoMerge branch 'master' of github:haskell/containers
Milan Straka [Thu, 11 Feb 2016 07:14:14 +0000 (08:14 +0100)] 
Merge branch 'master' of github:haskell/containers

3 years agoMake sure arguments are in correct order.
Milan Straka [Thu, 11 Feb 2016 07:13:08 +0000 (08:13 +0100)] 
Make sure arguments are in correct order.

3 years agoFix compilation.
Milan Straka [Thu, 11 Feb 2016 07:12:46 +0000 (08:12 +0100)] 
Fix compilation.

3 years agoMerge pull request #182 from jwaldmann/master
Milan Straka [Thu, 11 Feb 2016 05:54:02 +0000 (06:54 +0100)] 
Merge pull request #182 from jwaldmann/master

fix typo in documentation

3 years agofix typo in documentation
Johannes Waldmann [Wed, 10 Feb 2016 22:46:56 +0000 (23:46 +0100)] 
fix typo in documentation

3 years agoMerge pull request #181 from jwaldmann/master
Milan Straka [Wed, 10 Feb 2016 20:30:22 +0000 (21:30 +0100)] 
Merge pull request #181 from jwaldmann/master

repair broken URL in IntMap documentation

3 years agorepair broken URL in IntMap documentation
Johannes Waldmann [Wed, 10 Feb 2016 15:38:49 +0000 (16:38 +0100)] 
repair broken URL in IntMap documentation

3 years agoMerge pull request #179 from treeowl/traverseWithIndex
Milan Straka [Sat, 23 Jan 2016 09:47:41 +0000 (10:47 +0100)] 
Merge pull request #179 from treeowl/traverseWithIndex

Add traverseWithIndex

3 years agoAdd traverseWithIndex
David Feuer [Tue, 19 Jan 2016 21:30:37 +0000 (16:30 -0500)] 
Add traverseWithIndex

Hack Milan's `mapWithIndex` into `traverseWithIndex`.
Add some RULES for it.
Add tests.

3 years agoMerge pull request #178 from treeowl/polyreverse
Milan Straka [Tue, 19 Jan 2016 08:05:34 +0000 (09:05 +0100)] 
Merge pull request #178 from treeowl/polyreverse

Make reverse helpers polymorphic

3 years agoMake reverse helpers polymorphic
David Feuer [Tue, 19 Jan 2016 07:14:53 +0000 (02:14 -0500)] 
Make reverse helpers polymorphic

Lean a bit harder on the type system to ensure that the
reversing function is called everywhere it's supposed
to be. Yes, this should all be covered by the test suite
anyway, but it can't hurt.

3 years agoAdd changelog.md to extra-source-files.
Milan Straka [Sun, 20 Dec 2015 16:14:30 +0000 (17:14 +0100)] 
Add changelog.md to extra-source-files.

3 years agoBump to version v0.5.7.1. v0.5.7.1
Milan Straka [Sun, 20 Dec 2015 15:54:41 +0000 (16:54 +0100)] 
Bump to version v0.5.7.1.

3 years agoAdd changelog.
Milan Straka [Sun, 20 Dec 2015 10:14:01 +0000 (11:14 +0100)] 
Add changelog.

3 years agoBump version to v0.5.7.0. containers-0.5.7.0-release
Milan Straka [Thu, 17 Dec 2015 19:35:04 +0000 (20:35 +0100)] 
Bump version to v0.5.7.0.

3 years agoMerge pull request #171 from hvr/pr/semigroups
Milan Straka [Sun, 29 Nov 2015 12:24:03 +0000 (13:24 +0100)] 
Merge pull request #171 from hvr/pr/semigroups

Semigroup instances

3 years agoRename local binding to avoid clash with `(<>)`
Herbert Valerio Riedel [Sat, 28 Nov 2015 21:14:16 +0000 (22:14 +0100)] 
Rename local binding to avoid clash with `(<>)`

3 years agoDefine Semigroup instances for base>=4.9
Herbert Valerio Riedel [Sat, 28 Nov 2015 21:13:54 +0000 (22:13 +0100)] 
Define Semigroup instances for base>=4.9

See https://github.com/ekmett/semigroups/issues/56 for more details

3 years agoMerge pull request #169 from hvr/pr/ghc-head-wall-clean
Milan Straka [Wed, 25 Nov 2015 08:31:26 +0000 (09:31 +0100)] 
Merge pull request #169 from hvr/pr/ghc-head-wall-clean

GHC HEAD -Wall cleanups

3 years agoMerge pull request #168 from hvr/pr/minor-cleanups
Milan Straka [Wed, 25 Nov 2015 08:30:03 +0000 (09:30 +0100)] 
Merge pull request #168 from hvr/pr/minor-cleanups

Minor cleanups

3 years agoDrop seemingly ineffective SPECIALISE pragmas
Herbert Valerio Riedel [Wed, 25 Nov 2015 07:49:03 +0000 (08:49 +0100)] 
Drop seemingly ineffective SPECIALISE pragmas

GHC HEAD warns about these:

```
Data/Sequence.hs:407:1: warning:
    SPECIALISE pragma for non-overloaded function ‘aptyMiddle’

Data/Sequence.hs:416:1: warning:
    SPECIALISE pragma for non-overloaded function ‘aptyMiddle’

Data/Sequence.hs:1001:1: warning:
    SPECIALISE pragma for non-overloaded function ‘cycleNMiddle’

Data/Sequence.hs:1007:1: warning:
    SPECIALISE pragma for non-overloaded function ‘cycleNMiddle’
```

3 years agoRemove redundant constraints
Herbert Valerio Riedel [Wed, 25 Nov 2015 07:45:50 +0000 (08:45 +0100)] 
Remove redundant constraints

GHC HEAD warns about those:

```
Data/Sequence.hs:432:12: warning:
    • Redundant constraint: Sized a
    • In the type signature for:
           squashL :: Sized a =>
                      Digit23 a -> Digit12 (Node a) -> Digit23 (Node a)

Data/Sequence.hs:437:12: warning:
    • Redundant constraint: Sized a
    • In the type signature for:
           squashR :: Sized a =>
                      Digit12 (Node a) -> Digit23 a -> Digit23 (Node a)
```

3 years agoMake `-Wall` clean
Herbert Valerio Riedel [Wed, 25 Nov 2015 07:37:20 +0000 (08:37 +0100)] 
Make `-Wall` clean

Get rid of left-over redundant-import warnings from the last minute
AMP-changes that occured in GHC 7.10

3 years agocanonicalise Monad instances
Herbert Valerio Riedel [Wed, 25 Nov 2015 07:25:42 +0000 (08:25 +0100)] 
canonicalise Monad instances

4 years agoFix wrong complexity of IntMap.alter.
Milan Straka [Wed, 26 Aug 2015 12:11:49 +0000 (14:11 +0200)] 
Fix wrong complexity of IntMap.alter.

This resolves #165.

4 years agoFix copy-paste typos.
Milan Straka [Tue, 19 May 2015 21:32:51 +0000 (23:32 +0200)] 
Fix copy-paste typos.

4 years agoMerge pull request #156 from adubovik/master
Milan Straka [Tue, 19 May 2015 21:28:27 +0000 (23:28 +0200)] 
Merge pull request #156 from adubovik/master

Removed unnecessary strictness in IntSet.foldl accumulator.

4 years agoRemoved unnecessary strictness in IntSet.foldl accumulator.
Anton Dubovik [Thu, 14 May 2015 21:45:50 +0000 (00:45 +0300)] 
Removed unnecessary strictness in IntSet.foldl accumulator.

4 years agoMerge pull request #147 from treeowl/IsString
Milan Straka [Mon, 16 Mar 2015 15:02:26 +0000 (16:02 +0100)] 
Merge pull request #147 from treeowl/IsString

Add IsString instance

4 years agoAdd IsString instance
David Feuer [Mon, 16 Mar 2015 01:27:31 +0000 (21:27 -0400)] 
Add IsString instance

Add `instance IsString (Seq Char)` when compiling with GHC.

4 years agoMerge pull request #142 from lowasser/patch-1
Milan Straka [Wed, 11 Mar 2015 21:23:39 +0000 (22:23 +0100)] 
Merge pull request #142 from lowasser/patch-1

Minor typo fix in Data.Set.Base

4 years agoMinor typo fix in Data.Set.Base
Louis Wasserman [Wed, 11 Mar 2015 17:31:58 +0000 (10:31 -0700)] 
Minor typo fix in Data.Set.Base

4 years agoMerge pull request #141 from treeowl/newapbottomtry
Milan Straka [Wed, 11 Mar 2015 14:50:08 +0000 (15:50 +0100)] 
Merge pull request #141 from treeowl/newapbottomtry

Clean up <*> some more

4 years agoRemove Debian-specific -n column option.
Milan Straka [Wed, 11 Mar 2015 14:41:22 +0000 (15:41 +0100)] 
Remove Debian-specific -n column option.

It is not needed anyway here.

4 years agoMake rigidify non-recursive
David Feuer [Wed, 11 Mar 2015 02:42:28 +0000 (22:42 -0400)] 
Make rigidify non-recursive

`rigidify` would previously call itself at most once before
producing a constructor. This made it somewhat hard to see that it
had no infinite loops, and increased the number of tests required.

Improve internal documentation.

Rename the small immediate indexing benchmark to make some kind
of sense. Add more and better immediate indexing benchmarks.

Benchmarks:

<*>/ix500/1000^2      -13.81%  1.40e-06
<*>/ix500000/1000^2   -38.91%  5.14e-06
<*>/ixBIG             -17.96%  1.61e-05
<*>/nf100/2500/rep     +0.23%  8.58e-03
<*>/nf100/2500/ff      -1.82%  2.37e-02
<*>/nf500/500/rep      +0.01%  8.48e-03
<*>/nf500/500/ff       -0.94%  2.46e-02
<*>/nf2500/100/rep     -0.46%  8.53e-03
<*>/nf2500/100/ff      -1.22%  2.45e-02

4 years agoAdd header to bench-cmp.sh.
Milan Straka [Wed, 11 Mar 2015 09:33:47 +0000 (10:33 +0100)] 
Add header to bench-cmp.sh.

Also remove the less command, it can be easily added manually.

4 years agoImprove *>
David Feuer [Tue, 10 Mar 2015 23:57:49 +0000 (19:57 -0400)] 
Improve *>

Use `applicativeTree` and techniques from `<*>` to make `*>`
share as much as possible and offer immediate access with correct
time bounds.

4 years agoClean up <*> some more
David Feuer [Tue, 10 Mar 2015 15:30:10 +0000 (11:30 -0400)] 
Clean up <*> some more

1. Remove all partial functions and all "impossible" errors.

2. Simplify the way the sequence pieces are put together at the
bottom.

The immediate-indexing `<*>` test improves from 1.44 microseconds
to 1.24 microseconds. The other `<*>` tests improve very slightly.

4 years agoRemove comments after #endif.
Milan Straka [Tue, 10 Mar 2015 22:08:17 +0000 (23:08 +0100)] 
Remove comments after #endif.

They cause a lot of compilation warnings.

4 years agoUpdate the API changes/enhancements guide.
Milan Straka [Fri, 6 Mar 2015 22:15:51 +0000 (23:15 +0100)] 
Update the API changes/enhancements guide.

Fix link to Library submission guide and also explictly mention the
discussion on libraries@haskell.org mailing list.

4 years agoMerge pull request #139 from gallais/patch-1
Milan Straka [Fri, 20 Feb 2015 05:00:59 +0000 (06:00 +0100)] 
Merge pull request #139 from gallais/patch-1

typo in the doc for Data.Map.Base

4 years agotypo in the doc for Data.Map.Base
G. Allais [Thu, 19 Feb 2015 21:29:53 +0000 (21:29 +0000)] 
typo in the doc for Data.Map.Base

4 years agoMerge pull request #133 from treeowl/minversionbase
Milan Straka [Mon, 19 Jan 2015 08:49:31 +0000 (09:49 +0100)] 
Merge pull request #133 from treeowl/minversionbase

Improve MIN_VERSION_base fall-back

4 years agoImprove MIN_VERSION_base fall-back
David Feuer [Fri, 16 Jan 2015 18:51:06 +0000 (13:51 -0500)] 
Improve MIN_VERSION_base fall-back

Guess the base library version based on `__GLASGOW_HASKELL__`
when compiling without Cabal.

4 years agoBump version number to 0.5.6.3 containers-0.5.6.3-release
Milan Straka [Thu, 15 Jan 2015 11:41:01 +0000 (12:41 +0100)] 
Bump version number to 0.5.6.3

4 years agoMerge pull request #132 from treeowl/travis-update
Milan Straka [Thu, 15 Jan 2015 11:26:15 +0000 (12:26 +0100)] 
Merge pull request #132 from treeowl/travis-update

Update .travis.yml per hvr's advice

4 years agoUpdate .travis.yml per hvr's advice
David Feuer [Thu, 15 Jan 2015 03:47:19 +0000 (22:47 -0500)] 
Update .travis.yml per hvr's advice

We want it to be able to build with 7.10 and head.

4 years agoRemove unnecessary (Sized *) constraints.
Milan Straka [Sat, 10 Jan 2015 13:29:34 +0000 (14:29 +0100)] 
Remove unnecessary (Sized *) constraints.

4 years agoAdd unnecessary call in fromArray to make (Ix i) constraint look needed.
Milan Straka [Sat, 10 Jan 2015 13:25:35 +0000 (14:25 +0100)] 
Add unnecessary call in fromArray to make (Ix i) constraint look needed.

4 years agoMerge pull request #122 from treeowl/dangerdoc
Milan Straka [Sun, 4 Jan 2015 21:16:07 +0000 (22:16 +0100)] 
Merge pull request #122 from treeowl/dangerdoc

Add warning about Seq size.

4 years agoAdd warning about Seq size.
David Feuer [Wed, 31 Dec 2014 06:24:48 +0000 (01:24 -0500)] 
Add warning about Seq size.

4 years agoMerge pull request #118 from treeowl/apcleanup
Milan Straka [Tue, 30 Dec 2014 13:55:09 +0000 (14:55 +0100)] 
Merge pull request #118 from treeowl/apcleanup

Clean up <*> development artifacts

4 years agoMerge pull request #116 from treeowl/balanceReplicate
Milan Straka [Tue, 30 Dec 2014 13:49:36 +0000 (14:49 +0100)] 
Merge pull request #116 from treeowl/balanceReplicate

Make applicativeTree aim for safe digits

4 years agoMerge pull request #119 from hvr/pr-base48
Milan Straka [Tue, 30 Dec 2014 13:42:22 +0000 (14:42 +0100)] 
Merge pull request #119 from hvr/pr-base48

Make `-Wall`-clean for base-4.8.0.0

4 years agoMake `-Wall`-clean for base-4.8.0.0
Herbert Valerio Riedel [Sun, 28 Dec 2014 08:36:44 +0000 (09:36 +0100)] 
Make `-Wall`-clean for base-4.8.0.0

4 years agoClean up <*> development artifacts
David Feuer [Sun, 28 Dec 2014 02:35:36 +0000 (21:35 -0500)] 
Clean up <*> development artifacts

Some silly remnants of my thought process remained in the code.
Remove them.

4 years agoMake applicativeTree aim for safe digits
David Feuer [Thu, 25 Dec 2014 03:03:29 +0000 (22:03 -0500)] 
Make applicativeTree aim for safe digits

As previously discussed, this gives the tree more flexibility and
matches what other functions do.

4 years agoMerge pull request #110 from int-e/bench
Milan Straka [Mon, 22 Dec 2014 16:56:05 +0000 (17:56 +0100)] 
Merge pull request #110 from int-e/bench

update benchmarks for criterion-1.0

4 years agoupdate benchmarks to work with criterion-1.0
Bertram Felgenhauer [Mon, 22 Dec 2014 16:08:21 +0000 (17:08 +0100)] 
update benchmarks to work with criterion-1.0

4 years agoupdate benchmarks Makefile
Bertram Felgenhauer [Sun, 21 Dec 2014 20:01:11 +0000 (21:01 +0100)] 
update benchmarks Makefile

4 years agoBump version number to 0.5.6.2 containers-0.5.6.2-release
Milan Straka [Mon, 22 Dec 2014 10:54:05 +0000 (11:54 +0100)] 
Bump version number to 0.5.6.2

4 years agoMerge pull request #104 from treeowl/ap
Milan Straka [Mon, 22 Dec 2014 10:13:16 +0000 (11:13 +0100)] 
Merge pull request #104 from treeowl/ap

Make <*> fast

4 years agoExploit some invariants
Bertram Felgenhauer [Sun, 21 Dec 2014 15:37:11 +0000 (16:37 +0100)] 
Exploit some invariants

Consequently, get rid of ApState.

This speeds up the immediate-indexing test substantially:

Old:

benchmarking <*>/ix1000/500000
time                 2.688 μs   (2.607 μs .. 2.798 μs)
                     0.994 R²   (0.988 R² .. 1.000 R²)
mean                 2.632 μs   (2.607 μs .. 2.715 μs)
std dev              129.9 ns   (65.93 ns .. 242.8 ns)
variance introduced by outliers: 64% (severely inflated)

New:

benchmarking <*>/ix1000/500000
time                 1.410 μs   (1.402 μs .. 1.417 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 1.417 μs   (1.411 μs .. 1.425 μs)
std dev              21.45 ns   (16.80 ns .. 31.73 ns)
variance introduced by outliers: 14% (moderately inflated)

4 years agoAdd Applicative benchmarks
David Feuer [Sat, 20 Dec 2014 20:02:05 +0000 (15:02 -0500)] 
Add Applicative benchmarks

4 years agoReimplement `<*>`
David Feuer [Thu, 18 Dec 2014 21:31:10 +0000 (16:31 -0500)] 
Reimplement `<*>`

Use `coerce` for the `Functor` instance of `Elem`

Using `fmap = coerce` for `Elem` speeds up `<*>` by somewhere
around 20%.

Benchmark results:

OLD:

benchmarking <*>/ix1000/500000
time                 11.47 ms   (11.37 ms .. 11.59 ms)
                     0.999 R²   (0.998 R² .. 1.000 R²)
mean                 11.61 ms   (11.52 ms .. 11.73 ms)
std dev              279.9 μs   (209.5 μs .. 385.6 μs)

benchmarking <*>/nf100/2500/rep
time                 8.530 ms   (8.499 ms .. 8.568 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 8.511 ms   (8.498 ms .. 8.528 ms)
std dev              40.40 μs   (28.55 μs .. 63.84 μs)

benchmarking <*>/nf100/2500/ff
time                 27.13 ms   (26.16 ms .. 28.70 ms)
                     0.994 R²   (0.988 R² .. 1.000 R²)
mean                 26.49 ms   (26.29 ms .. 27.43 ms)
std dev              697.1 μs   (153.0 μs .. 1.443 ms)

benchmarking <*>/nf500/500/rep
time                 8.421 ms   (8.331 ms .. 8.491 ms)
                     0.991 R²   (0.967 R² .. 1.000 R²)
mean                 8.518 ms   (8.417 ms .. 9.003 ms)
std dev              529.9 μs   (40.37 μs .. 1.176 ms)
variance introduced by outliers: 32% (moderately inflated)

benchmarking <*>/nf500/500/ff
time                 33.71 ms   (33.58 ms .. 33.86 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 33.69 ms   (33.62 ms .. 33.76 ms)
std dev              150.0 μs   (119.0 μs .. 191.0 μs)

benchmarking <*>/nf2500/100/rep
time                 8.390 ms   (8.259 ms .. 8.456 ms)
                     0.997 R²   (0.992 R² .. 1.000 R²)
mean                 8.544 ms   (8.441 ms .. 8.798 ms)
std dev              402.6 μs   (21.25 μs .. 714.9 μs)
variance introduced by outliers: 23% (moderately inflated)

benchmarking <*>/nf2500/100/ff
time                 53.69 ms   (53.33 ms .. 54.08 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 53.59 ms   (53.38 ms .. 53.75 ms)
std dev              341.2 μs   (231.7 μs .. 473.9 μs)

NEW

benchmarking <*>/ix1000/500000
time                 2.688 μs   (2.607 μs .. 2.798 μs)
                     0.994 R²   (0.988 R² .. 1.000 R²)
mean                 2.632 μs   (2.607 μs .. 2.715 μs)
std dev              129.9 ns   (65.93 ns .. 242.8 ns)
variance introduced by outliers: 64% (severely inflated)

benchmarking <*>/nf100/2500/rep
time                 8.371 ms   (8.064 ms .. 8.535 ms)
                     0.983 R²   (0.947 R² .. 1.000 R²)
mean                 8.822 ms   (8.590 ms .. 9.463 ms)
std dev              991.2 μs   (381.3 μs .. 1.809 ms)
variance introduced by outliers: 61% (severely inflated)

benchmarking <*>/nf100/2500/ff
time                 22.84 ms   (22.74 ms .. 22.94 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 22.78 ms   (22.71 ms .. 22.86 ms)
std dev              183.3 μs   (116.3 μs .. 291.3 μs)

benchmarking <*>/nf500/500/rep
time                 8.320 ms   (8.102 ms .. 8.514 ms)
                     0.995 R²   (0.990 R² .. 0.999 R²)
mean                 8.902 ms   (8.675 ms .. 9.407 ms)
std dev              952.4 μs   (435.5 μs .. 1.672 ms)
variance introduced by outliers: 58% (severely inflated)

benchmarking <*>/nf500/500/ff
time                 24.50 ms   (24.41 ms .. 24.58 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 24.44 ms   (24.41 ms .. 24.48 ms)
std dev              75.08 μs   (50.16 μs .. 111.3 μs)

benchmarking <*>/nf2500/100/rep
time                 8.419 ms   (8.366 ms .. 8.458 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 8.571 ms   (8.525 ms .. 8.670 ms)
std dev              179.5 μs   (112.0 μs .. 278.1 μs)

benchmarking <*>/nf2500/100/ff
time                 24.14 ms   (24.07 ms .. 24.26 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 24.11 ms   (24.07 ms .. 24.17 ms)
std dev              103.8 μs   (68.34 μs .. 142.0 μs)

4 years agoMerge pull request #107 from treeowl/fromListN
Milan Straka [Sat, 20 Dec 2014 12:06:44 +0000 (13:06 +0100)] 
Merge pull request #107 from treeowl/fromListN

Use fromList2 to implement fromListN in IsList

4 years agoMerge pull request #102 from treeowl/validation
Milan Straka [Sat, 20 Dec 2014 11:59:45 +0000 (12:59 +0100)] 
Merge pull request #102 from treeowl/validation

Add tests for Applicative and Monad instances

4 years agoRemove CPP
David Feuer [Sat, 20 Dec 2014 04:49:35 +0000 (23:49 -0500)] 
Remove CPP

4 years agoAdd tests for Applicative and Monad instances
David Feuer [Thu, 18 Dec 2014 17:44:57 +0000 (12:44 -0500)] 
Add tests for Applicative and Monad instances

Unfortunately, these tests are rather slow, so I hid them behind
a SLOW_TESTS macro. I don't know nearly enough about cabal to know
how to arrange for tests to be run conditionally, so hopefully
someone else can set that up properly.

4 years agoMerge pull request #108 from RossPaterson/master
Milan Straka [Fri, 19 Dec 2014 23:50:39 +0000 (00:50 +0100)] 
Merge pull request #108 from RossPaterson/master

Fix Arbitrary instance for FingerTree