summaryrefslogtreecommitdiff
path: root/libraries
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-076-1/+20
| | | | | | Previously the `integer-gmp` variant of `isValidNatural` would fail to detect values `<= maxBound::Word` that were incorrectly encoded using the `NatJ#` constructor.
* Factor out 'getLibDir' / 'getBaseDir' into a new GHC.BaseDir ghc-boot moduleJohn Ericson2019-06-072-0/+62
| | | | | | | | | | | | | | ghc-pkg and ghc already both needed this. I figure it is better to deduplicate, especially seeing that changes to one (FreeBSD CPP) didn't make it to the other. Additionally in !1090 I make ghc-pkg look up the settings file, which makes it use the top dir a bit more widely. If that lands, any difference in the way they find the top dir would be more noticable. That change also means sharing more code between ghc and ghc-package (namely the settings file parsing code), so I'd think it better to get off the slipperly slope of duplicating code now.
* 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
|
* support small arrays and CONSTR_NOCAF in ghc-heapDavid Hewson2019-05-312-0/+16
|
* 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 Template Haskell cross compilation on 64 bit compiler with 32 bit targetLuite Stegeman2019-05-222-7/+8
|
* Fix doc for Data.Function.fix.Javran Cheng2019-05-211-1/+1
| | | | Doc-only change.
* Guard CUSKs behind a language pragmaVladislav Zavialov2019-05-141-0/+1
| | | | | | | | | | | | | | GHC Proposal #36 describes a transition plan away from CUSKs and to top-level kind signatures: 1. Introduce a new extension, -XCUSKs, on by default, that detects CUSKs as they currently exist. 2. We turn off the -XCUSKs extension in a few releases and remove it sometime thereafter. This patch implements phase 1 of this plan, introducing a new language extension to control whether CUSKs are enabled. When top-level kind signatures are implemented, we can transition to phase 2.
* 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.
* Implement ImportQualifiedPostShayne Fletcher2019-05-081-0/+1
|
* 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.
* Make Extension derive BoundedShayne Fletcher2019-05-031-1/+1
|
* 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.
* ghci: Ensure that system libffi include path is searchedBen Gamari2019-04-291-0/+2
| | | | Previously hsc2hs failed when building against a system FFI.
* Update autoconf scriptsBen Gamari2019-04-254-3196/+3464
| | | | Scripts taken from autoconf a8d79c3130da83c7cacd6fee31b9acc53799c406
* TH: make `Lift` and `TExp` levity-polymorphicAlec Theriault2019-04-183-17/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides the obvious benefits of being able to manipulate `TExp`'s of unboxed types, this also simplified `-XDeriveLift` all while making it more capable. * `ghc-prim` is explicitly depended upon by `template-haskell` * The following TH things are parametrized over `RuntimeRep`: - `TExp(..)` - `unTypeQ` - `unsafeTExpCoerce` - `Lift(..)` * The following instances have been added to `Lift`: - `Int#`, `Word#`, `Float#`, `Double#`, `Char#`, `Addr#` - unboxed tuples of lifted types up to arity 7 - unboxed sums of lifted types up to arity 7 Ideally we would have levity-polymorphic _instances_ of unboxed tuples and sums. * The code generated by `-XDeriveLift` uses expression quotes instead of generating large amounts of TH code and having special hard-coded cases for some unboxed types.
* 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)/`.
* Ord docs: Add explanation on 'min' and 'max' operator interactionsSimon Jakobi2019-04-141-0/+4
| | | | [ci skip]
* 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-094-4/+4
| | | | | | | 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.
* Bump hpc submoduleRyan Scott2019-04-081-0/+0
| | | | | Currently, the `hpc` submodule is pinned against the `wip/final-mfp` branch, not against `master`. This pins it back against `master`.
* Fix whitespace styleYuriy Syrovetskiy2019-04-081-1/+1
|
* testsuite: Add testcase for #16111Ben Gamari2019-04-043-0/+16
|
* Replace git.haskell.org with gitlab.haskell.org (#16196)Yuriy Syrovetskiy2019-04-049-9/+9
|
* 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.
* integer-simple: Add documentation for Integer typeBen Gamari2019-04-031-0/+3
|
* integer-gmp: Write friendlier documentation for IntegerBen Gamari2019-04-031-2/+6
|
* base: Add documentation that liftA2 used to not be a typeclass methodAndrew Martin2019-04-031-0/+3
|
* Fix formatting issue in ghc-prim's changelog [skip ci]Alexandre Baldé2019-04-021-0/+1
|
* Bump array submoduleRyan Scott2019-04-011-0/+0
| | | | | | This bumps `array` to version 0.5.4.0 so that we can distinguish it with `MIN_VERSION_array` (as it introduces some changes to the `Show` instance for `UArray`).
* Clean up URLs to point to GitLabTakenobu Tani2019-04-011-1/+1
| | | | | | | | | | | | This moves URL references to old Trac to their corresponding GitLab counterparts. This patch does not update the submodule library, such as libraries/Cabal. See also !539, !606, !618 [ci skip]
* Bump ghc-prim's version where neededAlexandre2019-04-015-5/+5
|
* Add support for bitreverse primopAlexandre2019-04-015-2/+133
| | | | | | 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.
* Bump transformers to 0.5.6.2Ben Gamari2019-03-291-0/+0
| | | | See #16199.
* Fix a few broken Trac links [skip ci]Chaitanya Koparkar2019-03-279-9/+9
| | | | 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-2512-17/+17
| | | | | | | | | | | | | | | | | | | | | | | 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-2211-31/+11
| | | | | | As per https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail Coauthored-by: Ben Gamari <ben@well-typed.com>