summaryrefslogtreecommitdiff
path: root/libraries/base
Commit message (Collapse)AuthorAgeFilesLines
...
* base: Export FinalizersBen Gamari2019-06-071-0/+1
| | | | As requested in #16750.
* remove backticks from markup - it doesn't mean what I think it meanscode5hot2019-06-071-1/+1
|
* Used terminology from a paper. Added it as a reference.code5hot2019-06-071-3/+4
|
* Update Traversable.hs with a note about an intuitive lawcode5hot2019-06-071-1/+7
|
* Fix isValidNatural: The BigNat in NatJ# must have at least 2 limbsSimon Jakobi2019-06-075-1/+18
| | | | | | Previously the `integer-gmp` variant of `isValidNatural` would fail to detect values `<= maxBound::Word` that were incorrectly encoded using the `NatJ#` constructor.
* Improve ThreadId Show instanceNathan Collins2019-05-311-2/+2
| | | | By making it include parens when a derived instance would. For example, this changes the (hypothetical) code `show (Just (ThreadId 3))` to produce `"Just (ThreadId 3)"` instead of the current `"Just ThreadId 3"`.
* Implement (Functor.<$) for Data.Functor.{Compose,Product,Sum}Simon Jakobi2019-05-313-0/+5
| | | | | This allows us to make use of the (<$) implementations of the underlying functors.
* Implement (Functor.<$) for ArraySimon Jakobi2019-05-311-0/+9
|
* Don't lose parentheses in show SomeAsyncExceptionNathan Collins2019-05-291-1/+1
|
* base: Include (<$) in all exports of FunctorSimon Jakobi2019-05-272-3/+2
| | | | | | | Previously the haddocks for Control.Monad and Data.Functor gave the impression that `fmap` was the only Functor method. Fixes #16681.
* Add a `NOINLINE` pragma on `someNatVal` (#16586)Iavor Diatchki2019-05-232-0/+62
| | | | This fixes #16586, see `Note [NOINLINE someNatVal]` for details.
* Revert "Add Generic tuple instances up to 15-tuple" #16688David Eichmann2019-05-231-48/+0
| | | | | | This reverts commit 5eb9445444c4099fc9ee0803ba45db390900a80f. It has caused an increase in variance of performance test T9630, causing CI to fail.
* Fix doc for Data.Function.fix.Javran Cheng2019-05-211-1/+1
| | | | Doc-only change.
* Add Generic tuple instances up to 15-tupleOleg Grenrus2019-05-101-0/+48
| | | | | | | | Why 15? Because we have Eq instances up to 15. Metric Increase: T9630 haddock.base
* stg_floatToWord32zh: zero-extend the Word32 (#16617)Kevin Buhr2019-05-081-1/+2
| | | | | | | The primop stgFloatToWord32 was sign-extending the 32-bit word, resulting in weird negative Word32s. Zero-extend them instead. Closes #16617.
* Fix #16603 by documenting some important changes in changelogsRyan Scott2019-05-081-0/+8
| | | | | | This addresses some glaring omissions from `libraries/base/changelog.md` and `docs/users_guide/8.8.1-notes.rst`, fixing #16603 in the process.
* [ typo ] 'castFloatToWord32' -> 'castFloatToWord64'gallais2019-05-041-1/+1
| | | Probably due to a copy/paste gone wrong.
* Typeset Big-O complexities with Tex-style notation (#16090)Sven Tennie2019-05-032-4/+4
| | | | Use `\min` instead of `min` to typeset it as an operator.
* Update autoconf scriptsBen Gamari2019-04-252-1598/+1732
| | | | Scripts taken from autoconf a8d79c3130da83c7cacd6fee31b9acc53799c406
* Typeset Big-O complexities with Tex-style notation (#16090)Sven Tennie2019-04-177-68/+69
| | | | E.g. use `\(\mathcal{O}(n^2)\)` instead of `/O(n^2)/`.
* base: Better document implementation implications of Data.TimeoutBen Gamari2019-04-131-16/+25
| | | | | | | | | | As noted in #16546 timeout uses asynchronous exceptions internally, an implementation detail which can leak out in surprising ways. Note this fact. Also expose the `Timeout` tycon. [skip ci]
* removing x87 register support from native code genCarter Schonwald2019-04-102-17/+4
| | | | | | | | | | | | | | | | * simplifies registers to have GPR, Float and Double, by removing the SSE2 and X87 Constructors * makes -msse2 assumed/default for x86 platforms, fixing a long standing nondeterminism in rounding behavior in 32bit haskell code * removes the 80bit floating point representation from the supported float sizes * theres still 1 tiny bit of x87 support needed, for handling float and double return values in FFI calls wrt the C ABI on x86_32, but this one piece does not leak into the rest of NCG. * Lots of code thats not been touched in a long time got deleted as a consequence of all of this all in all, this change paves the way towards a lot of future further improvements in how GHC handles floating point computations, along with making the native code gen more accessible to a larger pool of contributors.
* Use ghc-prim < 0.7, not <= 0.6.1, as upper version boundsRyan Scott2019-04-091-1/+1
| | | | | | | Using `ghc-prim <= 0.6.1` is somewhat dodgy from a PVP point of view, as it makes it awkward to support new minor releases of `ghc-prim`. Let's instead use `< 0.7`, which is the idiomatic way of expressing PVP-compliant upper version bounds.
* testsuite: Add testcase for #16111Ben Gamari2019-04-043-0/+16
|
* Replace git.haskell.org with gitlab.haskell.org (#16196)Yuriy Syrovetskiy2019-04-041-1/+1
|
* Inline the definition of 'ap' in the Monad lawsChris Martin2019-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The law as it is currently written is meaningless, because nowhere have we defined the implementation of 'ap'. The reader of the Control.Monad documentation is provided with only a type signature, > ap :: Monad m => m (a -> b) -> m a -> m b an informal description, > In many situations, the liftM operations can be replaced by uses of > ap, which promotes function application. and a relationship between 'ap' and the 'liftM' functions > return f `ap` x1 `ap` ... `ap` xn > is equivalent to > liftMn f x1 x2 ... xn Without knowing how 'ap' is defined, a law involving 'ap' cannot provide any guidance for how to write a lawful Monad instance, nor can we conclude anything from the law. I suspect that a reader equipped with the understanding that 'ap' was defined prior to the invention of the Applicative class could deduce that 'ap' must be defined in terms of (>>=), but nowhere as far as I can tell have we written this down explicitly for readers without the benefit of historical context. If the law is meant to express a relationship among (<*>), (>>=), and 'return', it seems that it is better off making this statement directly, sidestepping 'ap' altogether.
* base: Add documentation that liftA2 used to not be a typeclass methodAndrew Martin2019-04-031-0/+3
|
* Bump ghc-prim's version where neededAlexandre2019-04-011-1/+1
|
* Add support for bitreverse primopAlexandre2019-04-012-0/+38
| | | | | | This commit includes the necessary changes in code and documentation to support a primop that reverses a word's bits. It also includes a test.
* Fix a few broken Trac links [skip ci]Chaitanya Koparkar2019-03-271-1/+1
| | | | This patch only attempts to fix links that don't automatically re-direct to the correct URL.
* Correct duplicate 4.12.0.0 entry in base's changelogRyan Scott2019-03-251-1/+1
| | | | | | See #16490. [ci skip]
* Update Wiki URLs to point to GitLabTakenobu Tani2019-03-254-4/+4
| | | | | | | | | | | | | | | | | | | | | | | This moves all URL references to Trac Wiki to their corresponding GitLab counterparts. This substitution is classified as follows: 1. Automated substitution using sed with Ben's mapping rule [1] Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy... New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy... 2. Manual substitution for URLs containing `#` index Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz 3. Manual substitution for strings starting with `Commentary` Old: Commentary/XxxYyy... New: commentary/xxx-yyy... See also !539 [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
* base: Remove `Monad(fail)` method and reexport `MonadFail(fail)` insteadHerbert Valerio Riedel2019-03-2210-31/+11
| | | | | | As per https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail Coauthored-by: Ben Gamari <ben@well-typed.com>
* Fix typo [skip ci]Alexandre Esteves2019-03-211-1/+1
|
* base: Depend upon shlwapi on WindowsBen Gamari2019-03-203-1/+9
| | | | | | | As noted in #16466, `System.Environment.getExecutablePath` depends upon `PathFileExistsW` which is defined by `shlwapi`. Fixes #16466.
* Update Trac ticket URLs to point to GitLabRyan Scott2019-03-1526-39/+39
| | | | | This moves all URL references to Trac tickets to their corresponding GitLab counterparts.
* base: Allow fusion for zip7 and relatedAlexandre2019-02-243-0/+34
| | | | | | | | | | | | | | | | | | Fixes #14037. Metric Decrease: T9872b T9872d Reviewers: bgamari, simonpj, hvr Reviewed By: simonpj Subscribers: AndreasK, simonpj, osa1, dfeuer, rwbarton, carter GHC Trac Issues: #14037 Differential Revision: https://phabricator.haskell.org/D5249
* hWaitForInput-accurate-socket testTom Sydney Kerckhove2019-02-233-0/+25
|
* Text.ParserCombinators.ReadP: use NonEmpty in FinalVaibhav Sagar2019-02-211-19/+22
| | | | | | The `Final` constructor needed to maintain the invariant that the list it is provided is always non-empty. Since NonEmpty is in `base` now, I think it would be better to use it for this purpose.
* Add comments about how zip fusionSimon Peyton Jones2019-02-202-26/+65
| | | | | | Alexandre Balde (rockbmb) points out that the fusion technology for foldr2, zip, zipWith, etc is undocumented. This patch adds comments to explain.
* base: Document errno behaviour in haddocks.Niklas Hambüchen2019-02-191-1/+5
| | | Also add an implementation comment for details.
* Minor documentation fix in GHC.ForeignPtrÖmer Sinan Ağacan2019-02-161-5/+3
|
* Properly escape character literals in HaddocksAlec Theriault2019-02-155-14/+14
| | | | | | | | Character literals in Haddock should not be written as plain `'\n'` since single quotes are for linking identifiers. Besides, since we want the character literal to be monospaced, we really should use `@\'\\n\'@`. [skip ci]
* Implement -Wredundant-record-wildcards and -Wunused-record-wildcardsMatthew Pickering2019-02-141-2/+2
| | | | | | | | | -Wredundant-record-wildcards warns when a .. pattern binds no variables. -Wunused-record-wildcards warns when none of the variables bound by a .. pattern are used. These flags are enabled by `-Wall`.
* Fix typos [skip ci]Alexandre Esteves2019-02-131-2/+2
|
* Add a changelog for base 4.14.0.0Langston Barrett2019-02-082-1/+6
|
* TestEquality instance for ComposeLangston Barrett2019-02-081-1/+13
|
* hWaitForInput-accurate-stdin testBen Gamari2019-01-313-0/+53
|
* Add a RTS option -xp to load PIC object anywhere in address spaceZejun Wu2019-01-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This re-applies {D5195} with fixes for i386: * Fix unused label warnings, see {D5230} or {D5273} * Fix a silly bug introduced by moving `#if` {P190} Add a RTS option -xp to load PIC object anywhere in address space. We do this by relaxing the requirement of <0x80000000 result of `mmapForLinker` and implying USE_CONTIGUOUS_MMAP. We also need to change calls to `ocInit` and `ocGetNames` to avoid dangling pointers when the address of `oc->image` is changed by `ocAllocateSymbolExtra`. Test Plan: See {D5195}, also test under i386: ``` $ uname -a Linux watashi-arch32 4.18.5-arch1-1.0-ARCH #1 SMP PREEMPT Tue Aug 28 20:45:30 CEST 2018 i686 GNU/Linux $ cd testsuite/tests/th/ && make test ... ``` will run `./validate` on stacked diff. Reviewers: simonmar, bgamari, alpmestan, trommler, hvr, erikd Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5289
* Compile count{Leading,Trailing}Zeros to corresponding x86_64 instructions ↵Dmitry Ivanov2019-01-303-0/+34
| | | | | | | under -mbmi2 This works similarly to existing implementation for popCount. Trac ticket: #16086.