summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* fix ambiguity in `const` documentationalirezaghey2021-12-141-1/+1
| | | | fixes #20412
* rts: update xxhash used by the linker's hashmapTamar Christina2021-12-144-1047/+4684
|
* Data.Functor.Classes: fix Ord1 instance for DownVaibhav Sagar2021-12-145-1/+16
|
* GHC.Utils.Misc.only: Add doc string.Andreas Klebinger2021-12-141-0/+4
| | | | | | | This function expects a singleton list as argument but only checks this in debug builds. I've added a docstring saying so. Fixes #20797
* Respect W^X in Linker.c:preloadObjectFile on OpenBSDGreg Steuck2021-12-121-1/+1
| | | | This fixes -fexternal-interpreter for ghci. Fixes #20814.
* Use HasCallStack and error in GHC.List and .NonEmptyOleg Grenrus2021-12-1215-86/+170
| | | | | | | | | | | | | | | | | In addition to providing stack traces, the scary HasCallStack will hopefully make people think whether they want to use these functions, i.e. act as a documentation hint that something weird might happen. A single metric increased, which doesn't visibly use any method with `HasCallStack`. ------------------------- Metric Decrease: T9630 Metric Decrease: T19695 T9630 -------------------------
* Drop --configure from Hadrian docsAndrey Mokhov2021-12-123-28/+4
|
* gitlab-ci: Bump fedora jobs to use Fedora 33Ben Gamari2021-12-121-14/+14
| | | | | | | Annoyingly, this will require downstream changes in head.hackage, which depends upon the artifact produced by this job. Prompted by !6462.
* iserv: Remove network dependent parts of libiservMatthew Pickering2021-12-129-986/+0
| | | | | | | | | | | | | | As noted in #20794 the parts of libiserv and iserv-proxy depend on network, therefore are never built nor tested during CI. Due to this iserv-proxy had bitrotted due to the bound on bytestring being out of date. Given we don't test this code it seems undesirable to distribute it. Therefore, it's removed and an external maintainer can be responsible for testing it (via head.hackage if desired). Fixes #20794
* rts: correct stats when running with +RTS -qn1Douglas Wilson2021-12-121-28/+42
| | | | | | | | | | | | | | | | | | | Despite the documented care having been taken, several bugs are fixed here. When run with -qn1, when a SYNC_GC_PAR is requested we will have n_gc_threads == n_capabilities && n_gc_idle_threads == (n_gc_threads - 1) In this case we now: * Don't increment par_collections * Don't increment par_balanced_copied * Don't emit debug traces for idle threads * Take the fast path in scavenge_until_all_done, wakeup_gc_threads, and shutdown_gc_threads. Some ASSERTs have also been tightened. Fixes #19685
* Perf: remove allocation in writeBlocks and fix comment (#14309)Sylvain Henry2021-12-111-32/+39
|
* Bump text submodule to 2.0-rc2Bodigrim2021-12-111-0/+0
|
* Add PromotedInfixT/PromotedUInfixT to THJakob Brünker2021-12-1110-111/+192
| | | | | | | | | | | | Previously, it was not possible to refer to a data constructor using InfixT with a dynamically bound name (i.e. a name with NameFlavour `NameS` or `NameQ`) if a type constructor of the same name exists. This commit adds promoted counterparts to InfixT and UInfixT, analogously to how PromotedT is the promoted counterpart to ConT. Closes #20773
* docs: Drop old release notesBen Gamari2021-12-103-929/+0
| | | | Closes #20786
* Remove confusing haddock quotes in 'readInt' documentationMatthew Pickering2021-12-101-1/+1
| | | | | | | | | As pointed out in #20776, placing quotes in this way linked to the 'Integral' type class which is nothing to do with 'readInt', the text should rather just be "integral", to suggest that the argument must be an integer. Closes #20776
* rts: use allocation helpers from RtsUtilsnineonine2021-12-109-17/+17
| | | | | | | Just a tiny cleanup inspired by the following comment: https://gitlab.haskell.org/ghc/ghc/-/issues/19437#note_334271 I was just getting familiar with rts code base so I thought might as well do this.
* Use file hash cache when hashing object file dependenciesMatthew Pickering2021-12-091-1/+2
| | | | | | | | | | | | | | | | | | | This fixes the immediate problem that we hash the same file multiple different times which causes quite a noticeably performance regression. In the future we can probably do better than this by storing the implementation hash in the interface file rather than dependending on hashing the object file. Related to #20604 which notes some inefficiencies with the current recompilation logic. Closes #20790 ------------------------- Metric Decrease: T14052Type -------------------------
* Hadrian: Allow building with GHC 9.2Ryan Scott2021-12-093-3/+10
| | | | | | A separate issue is the fact that many of `hadrian`'s modules produce `-Wincomplete-uni-patterns` warnings under 9.2, but that is probably best left to a separate patch.
* Remove `optLevel` from `DynFlags` (closes #20500)Gergo ERDI2021-12-098-23/+40
|
* Add `Opt_CoreConstantFolding` to turn on constant folding (#20500)Gergo ERDI2021-12-095-3/+19
| | | | | Previously, `-O1` and `-O2`, by way of their effect on the compilation pipeline, they implicitly turned on constant folding
* Use same optimization pipeline regardless of `optLevel` (#20500)Gergo ERDI2021-12-091-13/+9
|
* Improve mtimesDefaultDavid Feuer2021-12-091-3/+22
| | | | | | | * Make 'mtimesDefault' use 'stimes' for the underlying monoid rather than the default 'stimes'. * Explain in the documentation why one might use `mtimesDefault`.
* Drop O(n^2) warning on concatViktor Dukhovni2021-12-091-3/+0
|
* A few more typosViktor Dukhovni2021-12-091-6/+7
|
* Fix typo and outdated link in Data.FoldableViktor Dukhovni2021-12-092-3/+4
| | | | | | | | Amazing nobody had reported the "Foldabla" typo. :-( The Traversable docs got overhauled, leaving a stale link in Foldable to a section that got replaced. Gave the new section an anchor and updated the link.
* package imports: Take into account package visibility when renamingMatthew Pickering2021-12-0920-22/+167
| | | | | | | | | | | | In 806e49ae the package imports refactoring code was modified to rename package imports. There was a small oversight which meant the code didn't account for module visibility. This patch fixes that oversight. In general the "lookupPackageName" function is unsafe to use as it doesn't account for package visiblity/thinning/renaming etc, there is just one use in the compiler which would be good to audit. Fixes #20779
* Bump bytestring submodule to 0.11.2.0Bodigrim2021-12-092-3/+3
| | | | | | | | Both tests import `Data.ByteString`, so the change in allocations is more or less expected. Metric Increase: T19695 T9630
* Perf: remove an indirection when fetching the unique maskSylvain Henry2021-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slight decrease but still noticeable on CI: Baseline Test Metric value New value Change ----------------------------------------------------------------------------- ManyAlternatives(normal) ghc/alloc 747607676.0 747458936.0 -0.0% ManyConstructors(normal) ghc/alloc 4003722296.0 4003530032.0 -0.0% MultiLayerModules(normal) ghc/alloc 3064539560.0 3063984552.0 -0.0% MultiLayerModulesRecomp(normal) ghc/alloc 894700016.0 894700624.0 +0.0% PmSeriesG(normal) ghc/alloc 48410952.0 48262496.0 -0.3% PmSeriesS(normal) ghc/alloc 61561848.0 61415768.0 -0.2% PmSeriesT(normal) ghc/alloc 90975784.0 90829360.0 -0.2% PmSeriesV(normal) ghc/alloc 60405424.0 60259008.0 -0.2% T10421(normal) ghc/alloc 113275928.0 113137168.0 -0.1% T10421a(normal) ghc/alloc 79195676.0 79050112.0 -0.2% T10547(normal) ghc/alloc 28720176.0 28710008.0 -0.0% T10858(normal) ghc/alloc 180992412.0 180857400.0 -0.1% T11195(normal) ghc/alloc 283452220.0 283293832.0 -0.1% T11276(normal) ghc/alloc 137882128.0 137745840.0 -0.1% T11303b(normal) ghc/alloc 44453956.0 44309184.0 -0.3% T11374(normal) ghc/alloc 248118668.0 247979880.0 -0.1% T11545(normal) ghc/alloc 971994728.0 971852696.0 -0.0% T11822(normal) ghc/alloc 131544864.0 131399024.0 -0.1% T12150(optasm) ghc/alloc 79336468.0 79191888.0 -0.2% T12227(normal) ghc/alloc 495064180.0 494943040.0 -0.0% T12234(optasm) ghc/alloc 57198468.0 57053568.0 -0.3% T12425(optasm) ghc/alloc 90928696.0 90793440.0 -0.1% T12545(normal) ghc/alloc 1695417772.0 1695275744.0 -0.0% T12707(normal) ghc/alloc 956258984.0 956138864.0 -0.0% T13035(normal) ghc/alloc 102279484.0 102132616.0 -0.1% T13056(optasm) ghc/alloc 367196556.0 367066408.0 -0.0% T13253(normal) ghc/alloc 334365844.0 334255264.0 -0.0% T13253-spj(normal) ghc/alloc 125474884.0 125328672.0 -0.1% T13379(normal) ghc/alloc 359185604.0 359036960.0 -0.0% T13701(normal) ghc/alloc 2403026480.0 2402677464.0 -0.0% T13719(normal) ghc/alloc 4192234752.0 4192039448.0 -0.0% T14052(ghci) ghc/alloc 2745868552.0 2747706176.0 +0.1% T14052Type(ghci) ghc/alloc 7335937964.0 7336283280.0 +0.0% T14683(normal) ghc/alloc 2992557736.0 2992436872.0 -0.0% T14697(normal) ghc/alloc 363391248.0 363222920.0 -0.0% T15164(normal) ghc/alloc 1292578008.0 1292434240.0 -0.0% T15304(normal) ghc/alloc 1279603472.0 1279465944.0 -0.0% T15630(normal) ghc/alloc 161707776.0 161602632.0 -0.1% T16190(normal) ghc/alloc 276904644.0 276555264.0 -0.1% T16577(normal) ghc/alloc 7573033016.0 7572982752.0 -0.0% T16875(normal) ghc/alloc 34937980.0 34796592.0 -0.4% T17096(normal) ghc/alloc 287436348.0 287299368.0 -0.0% T17516(normal) ghc/alloc 1714727484.0 1714617664.0 -0.0% T17836(normal) ghc/alloc 1091095748.0 1090958168.0 -0.0% T17836b(normal) ghc/alloc 52467912.0 52321296.0 -0.3% T17977(normal) ghc/alloc 44971660.0 44826480.0 -0.3% T17977b(normal) ghc/alloc 40941128.0 40793160.0 -0.4% T18140(normal) ghc/alloc 82363124.0 82213056.0 -0.2% T18223(normal) ghc/alloc 1168448128.0 1168333624.0 -0.0% T18282(normal) ghc/alloc 131577844.0 131440400.0 -0.1% T18304(normal) ghc/alloc 86988664.0 86844432.0 -0.2% T18478(normal) ghc/alloc 742992400.0 742871136.0 -0.0% T18698a(normal) ghc/alloc 337654412.0 337526792.0 -0.0% T18698b(normal) ghc/alloc 398840772.0 398716472.0 -0.0% T18923(normal) ghc/alloc 68964992.0 68818768.0 -0.2% T1969(normal) ghc/alloc 764285884.0 764156168.0 -0.0% T19695(normal) ghc/alloc 1395577984.0 1395552552.0 -0.0% T20049(normal) ghc/alloc 89159032.0 89012952.0 -0.2% T3064(normal) ghc/alloc 191194856.0 191051816.0 -0.1% T3294(normal) ghc/alloc 1604762016.0 1604656488.0 -0.0% T4801(normal) ghc/alloc 296829368.0 296687824.0 -0.0% T5030(normal) ghc/alloc 364720540.0 364580152.0 -0.0% T5321FD(normal) ghc/alloc 271090004.0 270950824.0 -0.1% T5321Fun(normal) ghc/alloc 301244320.0 301102960.0 -0.0% T5631(normal) ghc/alloc 576154548.0 576022904.0 -0.0% T5642(normal) ghc/alloc 471105876.0 470967552.0 -0.0% T5837(normal) ghc/alloc 36328620.0 36186720.0 -0.4% T6048(optasm) ghc/alloc 103125988.0 102981024.0 -0.1% T783(normal) ghc/alloc 386945556.0 386795984.0 -0.0% T9020(optasm) ghc/alloc 247835012.0 247696704.0 -0.1% T9198(normal) ghc/alloc 47556208.0 47413784.0 -0.3% T9233(normal) ghc/alloc 682210596.0 682069960.0 -0.0% T9630(normal) ghc/alloc 1429689648.0 1429581168.0 -0.0% T9675(optasm) ghc/alloc 431092812.0 430943192.0 -0.0% T9872a(normal) ghc/alloc 1705052592.0 1705042064.0 -0.0% T9872b(normal) ghc/alloc 2180406760.0 2180395784.0 -0.0% T9872c(normal) ghc/alloc 1760508464.0 1760497936.0 -0.0% T9872d(normal) ghc/alloc 501517968.0 501309464.0 -0.0% T9961(normal) ghc/alloc 354037204.0 353891576.0 -0.0% TcPlugin_RewritePerf(normal) ghc/alloc 2381708520.0 2381550824.0 -0.0% WWRec(normal) ghc/alloc 589553520.0 589407216.0 -0.0% hard_hole_fits(normal) ghc/alloc 492122188.0 492470648.0 +0.1% hie002(normal) ghc/alloc 9336434800.0 9336443496.0 +0.0% parsing001(normal) ghc/alloc 537680944.0 537659824.0 -0.0% geo. mean -0.1%
* generalize GHC.Cmm.Dataflow to work over any node typeNorman Ramsey2021-12-073-31/+72
| | | | | | See #20725. The commit includes source-code changes and a test case.
* Explicit Data.List import list in check-ppr (#20789)Sebastian Graf2021-12-071-1/+1
| | | | | | | | `check-ppr` features an import of Data.List without an import list. After 81082cf4, this breaks the local validate flavour because of the compat warning and `-Werror`. So fix that. Fixes #20789.
* Re-export GHC.Types from GHC.Extssheaf2021-12-074-58/+63
| | | | | | | | | | | | | | Several times in the past, it has happened that things from GHC.Types were not re-exported from GHC.Exts, forcing users to import either GHC.Types or GHC.Prim, which are subject to internal change without notice. We now re-export GHC.Types from GHC.Exts, which should avoid this happening again in the future. In particular, we now re-export `Multiplicity` and `MultMul`, which we didn't before. Fixes #20695
* More permissive parsing of higher-rank type IPssheaf2021-12-077-1/+42
| | | | | | | | | | | | | | | | | The parser now accepts implicit parameters with higher-rank types, such as `foo :: (?ip :: forall a. a -> a) => ...` Before this patch, we instead insisted on parentheses like so: `foo :: (?ip :: (forall a. a -> a)) => ...` The rest of the logic surrounding implicit parameters is unchanged; in particular, even with ImpredicativeTypes, this idiom is not likely to be very useful. Fixes #20654
* rts: +RTS -DL should imply +RTS -DlBen Gamari2021-12-072-0/+3
| | | | | Otherwise the user may be surprised by the missing context provided by the latter.
* rts/Linker: Ensure that mmap_32bit_base is updated after mappingBen Gamari2021-12-071-21/+22
| | | | | | | | | | The amount of duplicated code in `mmapForLinker` hid the fact that some codepaths would fail to update `mmap_32bit_base` (specifically, on platforms like OpenBSD where `MAP_32BIT` is not supported). Refactor the function to make the implementation more obviously correct. Closes #20734.
* Fix user-guide typoViktor Dukhovni2021-12-071-1/+1
|
* Use italic big-O notation in Data.FoldableViktor Dukhovni2021-12-071-18/+18
|
* More specific documentation of foldr' caveatsViktor Dukhovni2021-12-071-3/+17
|
* compiler: Eliminate accidental loop in GHC.SysTools.BaseDirBen Gamari2021-12-074-4/+14
| | | | | | | | As noted in #20757, `GHC.SysTools.BaseDir.findToolDir` previously contained an loop, which would be triggered in the case that the search failed. Closes #20757.
* List-monomorphic `foldr'`Viktor Dukhovni2021-12-072-10/+44
| | | | | | | | | | | | | While a *strict* (i.e. constant space) right-fold on lists is not possible, the default `foldr'` is optimised for structures like `Seq`, that support efficient access to the right-most elements. The original default implementation seems to have a better constant factor for lists, so we add a monomorphic implementation in GHC.List. Should this be re-exported from `Data.List`? That would be a user-visible change if both `Data.Foldable` and `Data.List` are imported unqualified...
* Add section to the user guide about OS memory usageMatthew Pickering2021-12-063-2/+110
|
* Test-suite: fix geometric mean of empty listsheaf2021-12-031-2/+5
| | | | | | | The geometric mean computation panicked when it was given an empty list, which happens when there are no baselines. Instead, we should simply return 1.
* Revert "Data.List specialization to []"Matthew Pickering2021-12-0347-1464/+1694
| | | | | | | | | | This reverts commit bddecda1a4c96da21e3f5211743ce5e4c78793a2. This implements the first step in the plan formulated in #20025 to improve the communication and migration strategy for the proposed changes to Data.List. Requires changing the haddock submodule to update the test output.
* Require all dirty_MUT_VAR callers to do explicit stg_MUT_VAR_CLEAN_info ↵nineonine2021-12-023-12/+24
| | | | comparison (#20088)
* Make openFile more tolerant of async excs (#18832)Kamil Dworakowski2021-12-025-45/+96
|
* hadrian: Don't rely on realpath in bindist MakefileBen Gamari2021-12-023-4/+58
| | | | | | | | As noted in #19963, `realpath` is not specified by POSIX and therefore cannot be assumed to be available. Here we provide a POSIX shell implementation of `realpath`, due to Julian Ospald and others. Closes #19963.
* testsuite: Specify expected word-size of machop testsBen Gamari2021-12-021-7/+8
| | | | These generally expect a particular word size.
* CmmToC: Cast possibly-signed results as unsignedBen Gamari2021-12-021-10/+40
| | | | | | | C11 rule 6.3.1.1 dictates that all small integers used in expressions be implicitly converted to `signed int`. However, Cmm semantics require that the width of the operands be preserved with zero-extension semantics. For this reason we must recast sub-word arithmetic results as unsigned.
* CmmToC: Always cast arguments as unsignedBen Gamari2021-12-024-4/+33
| | | | | | | As noted in Note [When in doubt, cast arguments as unsigned], we must ensure that arguments have the correct signedness since some operations (e.g. `%`) have different semantics depending upon signedness.
* CmmToC: Zero-extend sub-word size resultsBen Gamari2021-12-021-6/+41
| | | | | As noted in Note [Zero-extending sub-word signed results] we must explicitly zero-extend the results of sub-word-sized signed operations.
* CmmToC: Fix width of shift operationsBen Gamari2021-12-021-3/+15
| | | | | Under C's implicit widening rules, the result of an operation like (a >> b) where a::Word8 and b::Word will have type Word, yet we want Word.