- 20 Nov, 2014 1 commit
-
-
Herbert Valerio Riedel authored
Alas `{-# LANGUAGE Safe #-}` can't be used since `Data.Coerce` isn't "safe". However, we use `coerce` just as an optimisation (see also 4ba884bd which broke the safe-inferred status of `Data.Functor.Identity`), so this module at least deserves `{-# LANGUAGE Trustworthy #-}`. NOTE: `Data.Functor.Identity` was added to `base` in the context of #9664 Reviewed By: luite Differential Revision: https://phabricator.haskell.org/D507
-
- 19 Nov, 2014 1 commit
-
-
Herbert Valerio Riedel authored
This also overrides all optional `Foldable` methods (which would otherwise be default-implemented in terms of `foldMap`) with supposedly optimally minimal implementations. While at it, this also removes the redundant `{-# LANGUAGE CPP #-}`. Reviewed By: austin, dfeuer Differential Revision: https://phabricator.haskell.org/D467
-
- 18 Nov, 2014 3 commits
-
-
Austin Seipp authored
This broke validate due to name shadowing warnings. This reverts commit 1f6b1ab4.
-
Wieland Hoffmann authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Austin Seipp authored
Reviewed-by:
Edward Kmett <ekmett@gmail.com> Authored-by: Yalas, Scott Turner Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 13 Nov, 2014 2 commits
-
-
David Feuer authored
Previously, `Array`s were simply converted to lists, and the list methods used. That works acceptably well for `foldr` and `foldr1`, but not so sensibly for most other things. Left folds ended up "twisted" the way they are for lists, leading to surprising performance characteristics. Moreover, this implements `length` and `null` so they check the array size directly. Finally, a test is added to the testsuite ensuring the overridden `Foldable` methods agree with their expected default semantics. Addresses #9763 Reviewed By: hvr, austin Differential Revision: https://phabricator.haskell.org/D459
-
David Feuer authored
Make `words` a good producer and `unwords` a good consumer for list fusion. Thus `unwords . words` will avoid producing an intermediate list of words, although it will produce each individual word. Make `unwords` slightly lazier, so that `unwords (s : undefined) = s ++ undefined` instead of `= undefined`. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D375
-
- 11 Nov, 2014 1 commit
-
-
David Feuer authored
Use fewer left/right-biased folds for defaults and functions in `Data.Foldable`, to better support things that don't look like cons lists. This also extends the Haddock docstrings in `Data.Foldable`. Reviewed By: hvr, ekmett Differential Revision: https://phabricator.haskell.org/D441
-
- 10 Nov, 2014 1 commit
-
-
Herbert Valerio Riedel authored
This also updates the `transformers` submodule to the just released `transformers-0.4.2.0` package version. See #9664 for more details Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D313
-
- 07 Nov, 2014 1 commit
-
-
thomie authored
This makes nub and nubBy behave as specified in the Haskell 98 Report. This reverts 0ad9def5, and fixes #3280, #7913 and #2528 (properly). Before this change, the output of `T2528` was (4x wrong): ``` [A,B] [1,2] False False ``` Reviewed By: dfeuer, ekmett, austin, hvr Differential Revision: https://phabricator.haskell.org/D238
-
- 06 Nov, 2014 1 commit
-
-
mjo authored
Add doctest examples for every data type and function in `Data.Either` Differential Revision: https://phabricator.haskell.org/D443
-
- 05 Nov, 2014 3 commits
-
-
bernalex authored
Niklas Hambüchen suggested that we add the dual of `subsequences`, isSubsequenceOf (like `isPrefixOf` to `inits` & `isSuffixOf` to `tails`). It was a simple and noncontroversial proposal which passed unanimously. For more details see the original proposal discussion at https://www.haskell.org/pipermail/libraries/2014-November/024063.html Differential Revision: https://phabricator.haskell.org/D435Signed-off-by:
Alexander Berntsen <alexander@plaimi.net>
-
Herbert Valerio Riedel authored
This mostly cleans up irregularities introduced in 68255588 (re D352) as well as making sure Haddock is able to resolve all references.
-
David Feuer authored
New `Foldable` methods accidentally had `Foldable` contexts, which led to type roles being assigned incorrectly and preventing GND from deriving `Foldable` instances. Removing those fixes #9761. Moreover, this patch takes advantage of this fix by deriving `Foldable` (and `Eq`) for `UniqFM`. Differential Revision: https://phabricator.haskell.org/D425
-
- 04 Nov, 2014 5 commits
-
-
Herbert Valerio Riedel authored
Those manual descriptions in Haddock strings have become redundant since Haddock gained the ability to print the minimal complete definition as specified via `{-# MINIMAL #-}` annotation (or otherwise inferred by GHC). Moreover, this commit moves all `{-# MINIMAL #-}` annotations in `base` to the start of the respective `class` definitions, as this is more readable and matches more closely the way Haddock renders that information.
-
Herbert Valerio Riedel authored
This removes the redundant "Minimal complete definition"-block included in the Haddock comment since Haddock renders the `MINIMAL`-pragma as well (which has is moved to the start of `class` definition for better readability of the source code) Morever, the references to `testBitDefault`, `bitDefault`, and `popCountDefault` have been moved to the respective methods' Haddock strings for which they can be used.
-
Herbert Valerio Riedel authored
[skip ci]
-
David Feuer authored
Complete #9759. Use `coerce` to get nicer definitions of `Sum` and `Product`; update documentation for `First` and `Last`. Reviewed By: hvr Differential Revision: https://phabricator.haskell.org/D422
-
David Feuer authored
Fixes #9742. Previously, `foldr1` as applied to a list-like structure would be strict in the spine, and `foldl1` would be strict in the spine of a snoc-list. See also https://www.haskell.org/pipermail/libraries/2014-October/024035.html Differential Revision: https://phabricator.haskell.org/D423
-
- 02 Nov, 2014 1 commit
-
-
Joachim Breitner authored
This increases the chance of good code after fusing a left fold. See ticket #7994 and the new Note [Left folds via right fold] Differential Revision: https://phabricator.haskell.org/D393
-
- 31 Oct, 2014 4 commits
-
-
mjo authored
hvr made some suggestions in D352 and D371, this fixes them in the already-applied patch for Data/Bool.hs as well for consistency. Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D379
-
Herbert Valerio Riedel authored
This gets rid of `-fno-warn-unused-binds` by turning the E* types into constructor-less data types (as they're used as phantom-types only) Moreover, this modules uses `AutoDeriveTypeable` so we can drop all those redundant `deriving (Typeable)` lines as well Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D385
-
mjo authored
This adds doctest examples for every function and data type in `Data.Char`. Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D371
-
Herbert Valerio Riedel authored
With #9242 the `OverlappingInstances` extension got deprecated, this commit adapts the only two remaining places in `base` where it was still used. Starting with this commit, the `Typeable (s t)` instance (which seemingly was the motivation for using `OverlappingInstances` in the first place when `Typeable` was neither polykinded nor auto-derived-only, see also commit ce3fd0e0 which introduced overlapping instances) does no longer allow overlapping instances, and there doesn't seem to be any good reason to keep allowing overlapping instance now. This also removes redundant `LANGUAGE`/`OPTIONS_GHC` pragmas from `Data.Typeable` and refactors the language pragmas into more uniform single-line pragmas. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D377
-
- 29 Oct, 2014 1 commit
-
-
Herbert Valerio Riedel authored
This also updates a few occurences of recently added "Example" headings to make use of this new feature for testing
-
- 28 Oct, 2014 1 commit
-
-
David Feuer authored
This gets rid of all hand-unboxing in `GHC.List` and moves `Foldable` requirements from `Data.OldList` into `GHC.List` (preparatory work for addressing #9716). Specifically, this moves the definition of `maximum`, `minimum`, `foldl'`, `foldl1`, `foldl1'`, `sum`, and `product` into `GHC.List` (which now needs to import `GHC.Num`) Make `take`, `drop`, `length`, and `!!` generally saner (see also #9510) Performance overall seems minimally affected. Some things go up; some things go down; nothing moves horribly much. The code is much easier to read. Differential Revision: https://phabricator.haskell.org/D380
-
- 27 Oct, 2014 2 commits
-
-
David Feuer authored
The new implementation avoids reversing the "haystack" list, which can be very expensive. Reviewed By: ekmett Differential Revision: https://phabricator.haskell.org/D330
-
David Feuer authored
This forces the new value before installing it in the IORef. This optimisation was originally suggested by Patrick Palka and "exhibits a speedup of 1.7x (vanilla RTS) / 1.4x (threaded RTS)" according to #8345 Reviewed By: austin, simonmar Differential Revision: https://phabricator.haskell.org/D315
-
- 26 Oct, 2014 1 commit
-
-
Herbert Valerio Riedel authored
This adds the module `Data.Bifunctor` providing the `Bifunctor(bimap,first,second)` class and a couple of instances This module and the class were previously exported by the `bifunctors` package. In contrast to the original module all `INLINE` pragmas have been removed. Reviewed By: ekmett, austin, dolio Differential Revision: https://phabricator.haskell.org/D336
-
- 21 Oct, 2014 4 commits
-
-
mjo authored
Summary: Add examples for `Data.Bool`, and rework the existing documentation of the `bool` function slightly: the `a`,`b` in its explanation were changed to `x`,`y` to avoid ambiguity with the type variable 'a'. The examples have been tested, and two trailing spaces were removed. Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, ezyang, simonmar Differential Revision: https://phabricator.haskell.org/D360
-
mjo authored
Summary: Add doctest examples for the three standalone functions defined in Data.Functor: * Data.Functor.$> * Data.Functor.<$> * Data.Functor.void This is part of a larger plan to add examples for the functions in base, and to eventually enable automatic testing of them. Reviewers: austin, hvr, ekmett Reviewed By: austin Subscribers: hvr, ekmett, thomie, carter, ezyang, simonmar Differential Revision: https://phabricator.haskell.org/D352
-
David Feuer authored
Summary: Steal the findIndices implementation from Data.Sequence, that can participate in fold/build fusion Reviewers: nomeata, austin Reviewed By: nomeata, austin Subscribers: thomie, carter, ezyang, simonmar Differential Revision: https://phabricator.haskell.org/D345
-
David Feuer authored
Summary: Make things less branchy; use unsigned comparisons for range checking. Eliminate non-spaces more quickly in common cases in isSpace. Reviewers: ekmett, carter, austin Reviewed By: austin Subscribers: thomie, carter, ezyang, simonmar Differential Revision: https://phabricator.haskell.org/D340 GHC Trac Issues: #1473
-
- 19 Oct, 2014 2 commits
-
-
Herbert Valerio Riedel authored
This commit removes a couple of {-# OPTIONS_GHC -fno-warn-unused-imports #-} by cleaning up the imports, as well as ensuring that all modules in the GHC.* hierarchy avoid importing the `Prelude` module to clean-up the import graph a bit.
-
Herbert Valerio Riedel authored
Since they're implied by the lack of `NoImplicitPrelude`
-
- 18 Oct, 2014 1 commit
-
-
mgmeier authored
This finally removes the `Data.OldTypeable` module (which has been deprecated in 7.8), from `base`, compiler and testsuite. The deprecated `Typeable{1..7}` aliases in `Data.Typeable` are not removed yet in order to give existing code a bit more time to adapt. Reviewed By: hvr, dreixel Differential Revision: https://phabricator.haskell.org/D311
-
- 16 Oct, 2014 2 commits
-
-
David Feuer authored
Reviewed By: nomeata, austin Differential Revision: https://phabricator.haskell.org/D325
-
David Feuer authored
Fixes #9345. Use a modified banker's queue to achieve amortized optimal performance for inits. The previous implementation was extremely slow. Reviewed By: nomeata, ekmett, austin Differential Revision: https://phabricator.haskell.org/D329
-
- 11 Oct, 2014 1 commit
-
-
Herbert Valerio Riedel authored
There don't seem to be any corresponding `{-# SOURCE #-}` for the removed `.hs-boot`-files anymore (if there ever was any in the first place). This also removes a commented out `{-# SOURCE #-}` import which turns up when grepping the source for `{-# SOURCE #-}` occurences.
-
- 03 Oct, 2014 1 commit
-
-
rwbarton authored
-