summaryrefslogtreecommitdiff
path: root/libraries
Commit message (Collapse)AuthorAgeFilesLines
* Correct base's changelog for 4.16.1.0Hécate Moonlight2022-05-091-4/+9
| | | | | | | This commit reaffects the new Ix instances of the foreign integral types from base 4.17 to 4.16.1.0 closes #21529
* Start 9.6.1-notessheaf2022-05-051-0/+2
| | | | | Updates the documentation notes to start tracking changes for the 9.6.1 release (instead of 9.4).
* add since annotations for instances of ByteArrayTeo Camarasu2022-05-051-0/+9
|
* Fix broken rules for (^) with known small powersMatthew Craven2022-05-051-12/+11
|
* Explain that 'fail s' should run in the monad itselfTom Ellis2022-05-051-0/+4
|
* Assume at least one evaluation for nested SubDemands (#21081, #21133)wip/T21081Sebastian Graf2022-05-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the new `Note [SubDemand denotes at least one evaluation]`. A demand `n :* sd` on a let binder `x=e` now means > "`x` was evaluated `n` times and in any program trace it is evaluated, `e` is > evaluated deeply in sub-demand `sd`." The "any time it is evaluated" premise is what this patch adds. As a result, we get better nested strictness. For example (T21081) ```hs f :: (Bool, Bool) -> (Bool, Bool) f pr = (case pr of (a,b) -> a /= b, True) -- before: <MP(L,L)> -- after: <MP(SL,SL)> g :: Int -> (Bool, Bool) g x = let y = let z = odd x in (z,z) in f y ``` The change in demand signature "before" to "after" allows us to case-bind `z` here. Similarly good things happen for the `sd` in call sub-demands `Cn(sd)`, which allows for more eta-reduction (which is only sound with `-fno-pedantic-bottoms`, albeit). We also fix #21085, a surprising inconsistency with `Poly` to `Call` sub-demand expansion. In an attempt to fix a regression caused by less inlining due to eta-reduction in T15426, I eta-expanded the definition of `elemIndex` and `elemIndices`, thus fixing #21345 on the go. The main point of this patch is that it fixes #21081 and #21133. Annoyingly, I discovered that more precise demand signatures for join points can transform a program into a lazier program if that join point gets floated to the top-level, see #21392. There is no simple fix at the moment, but !5349 might. Thus, we accept a ~5% regression in `MultiLayerModulesTH_OneShot`, where #21392 bites us in `addListToUniqDSet`. T21392 reliably reproduces the issue. Surprisingly, ghc/alloc perf on Windows improves much more than on other jobs, by 0.4% in the geometric mean and by 2% in T16875. Metric Increase: MultiLayerModulesTH_OneShot Metric Decrease: T16875
* libraries/base: docs: Explain relationshipt between `finalizeForeignPtr` and ↵Niklas Hambüchen2022-05-022-10/+22
| | | | | | `*Conc*` creation Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/21420
* typosEric Lindblad2022-05-011-2/+2
|
* ghc-boot: export typesynonyms from GHC.Utils.EncodingAdam Sandberg Ericsson2022-04-301-0/+2
| | | | This makes the Haddocks easier to understand.
* Add a note about instance visibility across component boundariesparsonsmatt2022-04-301-3/+16
| | | | | | | | | | | | | | | | | | | In principle, the *visible* instances are * all instances defined in a prior top-level declaration group (see docs on `newDeclarationGroup`), or * all instances defined in any module transitively imported by the module being compiled However, actually searching all modules transitively below the one being compiled is unreasonably expensive, so `reifyInstances` will report only the instance for modules that GHC has had some cause to visit during this compilation. This is a shortcoming: `reifyInstances` might fail to report instances for a type that is otherwise unusued, or instances defined in a different component. You can work around this shortcoming by explicitly importing the modules whose instances you want to be visible. GHC issue #20529 has some discussion around this. Fixes #20529
* Bump bytestring submoduleBen Gamari2022-04-291-0/+0
| | | | Update to current `master`.
* winio: add support to iserv.Tamar Christina2022-04-283-4/+29
|
* add since annotation for GHC.Stack.CCS.whereFromTeo Camarasu2022-04-281-0/+2
|
* Add INLINE pragmas for Enum helper methodsSimon Peyton Jones2022-04-282-15/+63
| | | | | | | | | | | | | | | | | | | | | | | As #21343 showed, we need to be super-certain that the "helper methods" for Enum instances are actually inlined or specialised. I also tripped over this when I discovered that numericEnumFromTo and friends had no pragmas at all, so their performance was very fragile. If they weren't inlined, all bets were off. So I've added INLINE pragmas for them too. See new Note [Inline Enum method helpers] in GHC.Enum. I also expanded Note [Checking for INLINE loop breakers] in GHC.Core.Lint to explain why an INLINE function might temporarily be a loop breaker -- this was the initial bug report in #21343. Strangely we get a 16% runtime allocation decrease in perf/should_run/T15185, but only on i386. Since it moves in the right direction I'm disinclined to investigate, so I'll accept it. Metric Decrease: T15185
* Bump process submoduleBen Gamari2022-04-281-0/+0
|
* Mark GHC.Prim.PtrEq as Unsafesheaf2022-04-271-1/+1
| | | | | | | This module exports unsafe pointer equality operations, so we accordingly mark it as Unsafe. Fixes #21433
* Documentation for setLocaleEncodingBodigrim2022-04-271-2/+27
|
* Bump text submodule.Ben Gamari2022-04-271-0/+0
| | | | This should fix #21352
* Fix rendering of liftA haddockLi-yao Xia2022-04-251-2/+1
|
* Ensure that wired-in exception closures aren't GC'dBen Gamari2022-04-251-0/+2
| | | | | | | | | | | | | | | As described in Note [Wired-in exceptions are not CAFfy], a small set of built-in exception closures get special treatment in the code generator, being declared as non-CAFfy despite potentially containing CAF references. The original intent of this treatment for the RTS to then add StablePtrs for each of the closures, ensuring that they are not GC'd. However, this logic was not applied consistently and eventually removed entirely in 951c1fb0. This lead to #21141. Here we fix this bug by reintroducing the StablePtrs and document the status quo. Closes #21141.
* hadrian: Clean up handling of libffi dependenciesBen Gamari2022-04-251-2/+0
|
* Mention new MutableByteArray# wrapper in base changelog.Andreas Klebinger2022-04-221-1/+1
|
* Update test baselines to match new error messages from GHC.IO.Encoding.FailureBodigrim2022-04-224-34/+34
|
* Improve error messages from GHC.IO.Encoding.FailureBodigrim2022-04-221-8/+12
|
* Update changelog.Philip Hazelden2022-04-091-0/+3
|
* Add tests for several trace functions.Philip Hazelden2022-04-094-0/+27
|
* Add functions traceWith, traceShowWith, traceEventWith.Philip Hazelden2022-04-091-0/+35
| | | | | As discussed at https://github.com/haskell/core-libraries-committee/issues/36
* Bump deepseq to 1.4.7.0Matthew Pickering2022-04-091-0/+0
| | | | | | Updates deepseq submodule Fixes #20653
* Merge remote-tracking branch 'origin/master'Ben Gamari2022-04-086-13/+13
|\
| * Fixes to 9.4 release notesKrzysztof Gogolewski2022-04-081-1/+1
| | | | | | | | | | | | - Mention -Wforall-identifier - Improve description of withDict - Fix formatting
| * Rename [] to List (#21294)Vladislav Zavialov2022-04-073-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a small part of GHC Proposal #475. The key change is in GHC.Types: - data [] a = [] | a : [a] + data List a = [] | a : List a And the rest of the patch makes sure that List is pretty-printed as [] in various contexts. Updates the haddock submodule.
| * Remove Fun pattern from Typeable COMPLETE setsheaf2022-04-072-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GHC merge request !963 improved warnings in the presence of COMPLETE annotations. This allows the removal of the Fun pattern from the complete set. Doing so expectedly causes some redundant pattern match warnings, in particular in GHC.Utils.Binary.Typeable and Data.Binary.Class from the binary library; this commit addresses that. Updates binary submodule Fixes #20230
| |
| \
*-. \ Merge branches 'wip/windows-high-codegen', 'wip/windows-high-linker', ↵Ben Gamari2022-04-079-7/+26
|\ \ \ | |_|/ |/| | | | | 'wip/windows-clang-2' and 'wip/lint-rts-includes' into wip/windows-clang-join
| | * rts: Adjust RTS symbol table on Windows for ucrtBen Gamari2022-04-071-1/+1
| | |
| | * configure: Make environ decl check more robustBen Gamari2022-04-073-2/+20
| | | | | | | | | | | | | | | Some platforms (e.g. Windows/clang64) declare `environ` in `<stdlib.h>`, not `<unistd.h>`
| | * Bump text submoduleBen Gamari2022-04-061-0/+0
| | |
| | * Bump bytestring submoduleBen Gamari2022-04-061-0/+0
| | |
| | * Bump process submoduleBen Gamari2022-04-061-0/+0
| | | | | | | | | | | | Fixes missing TEST_CC_OPTS in testsuite tests.
| | * Bump Cabal submoduleBen Gamari2022-04-061-0/+0
| |/ |/| | | | | | | | | - Disable support for library-for-ghci on Windows as described in #21068. - Teach Cabal to use `ar -L` when available
| * Move msvcrt dep out of baseBen Gamari2022-04-061-3/+1
| |
| * rts/PEi386: Rework linkerBen Gamari2022-04-061-2/+5
|/ | | | | | | | | | | | | | | | This is a significant rework of the PEi386 linker, making the linker compatible with high image base addresses. Specifically, we now use the m32 allocator instead of `HeapAllocate`. In addition I found a number of latent bugs in our handling of import libraries and relocations. I've added quite a few comments describing what I've learned about Windows import libraries while fixing these. Thanks to Tamar Christina (@Phyx) for providing the address space search logic, countless hours of help while debugging, and his boundless Windows knowledge. Co-Authored-By: Tamar Christina <tamar@zhox.com>
* Bump text submodule to current `master`Ben Gamari2022-04-061-0/+0
| | | | Addresses #21295.
* Implement \cases (Proposal 302)Jakob Bruenker2022-04-015-8/+22
| | | | | | | | | | | | This commit implements proposal 302: \cases - Multi-way lambda expressions. This adds a new expression heralded by \cases, which works exactly like \case, but can match multiple apats instead of a single pat. Updates submodule haddock to support the ITlcases token. Closes #20768
* Change may not to might notMaxHearnden2022-04-011-1/+1
|
* Export MutableByteArray from Data.Array.ByteAndreas Klebinger2022-04-011-2/+22
| | | | This implements CLC proposal #49
* Remove wrong claim about naturality law.gershomb2022-04-011-4/+1
| | | | | | | | | | This docs change removes a longstanding confusion in the Traversable docs. The docs say "(The naturality law is implied by parametricity and thus so is the purity law [1, p15].)". However if one reads the reference a different "natural" law is implied by parametricity. The naturality law given as a law here is imposed. Further, the reference gives examples which violate both laws -- so they cannot be implied by parametricity. This PR just removes the wrong claim.
* Add instance Lift ByteArrayBodigrim2022-03-252-1/+58
|
* Add the OPAQUE pragmaChristiaan Baaij2022-03-253-0/+6
| | | | | | | | | | | | A new pragma, `OPAQUE`, that ensures that every call of a named function annotated with an `OPAQUE` pragma remains a call of that named function, not some name-mangled variant. Implements GHC proposal 0415: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0415-opaque-pragma.rst This commit also updates the haddock submodule to handle the newly introduced lexer tokens corresponding to the OPAQUE pragma.
* hi haddock: Lex and store haddock docs in interface filesZubin Duggal2022-03-235-1/+6
| | | | | | | | | | | | | | | | | | Names appearing in Haddock docstrings are lexed and renamed like any other names appearing in the AST. We currently rename names irrespective of the namespace, so both type and constructor names corresponding to an identifier will appear in the docstring. Haddock will select a given name as the link destination based on its own heuristics. This patch also restricts the limitation of `-haddock` being incompatible with `Opt_KeepRawTokenStream`. The export and documenation structure is now computed in GHC and serialised in .hi files. This can be used by haddock to directly generate doc pages without reparsing or renaming the source. At the moment the operation of haddock is not modified, that's left to a future patch. Updates the haddock submodule with the minimum changes needed.
* List GHC.Event.Internal in base.cabal on Windowssheaf2022-03-191-13/+7
| | | | | | | GHC.Event.Internal was not listed in base.cabal on Windows. This caused undefined reference errors. This patch adds it back, by moving it out of the OS-specific logic in base.cabal. Fixes #21245.