summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MR template should ask for key partwip/mr-template-key-partRichard Eisenberg2020-05-141-1/+6
|
* Use Data.IntMap.disjointSimon Jakobi2020-05-1416-34/+29
| | | | | | | | | Data.IntMap gained a dedicated `disjoint` function in containers-0.6.2.1. This patch applies this function where appropriate in hopes of modest compiler performance improvements. Closes #16806.
* Improve some folds over Uniq[D]FMSimon Jakobi2020-05-1421-86/+134
| | | | | | | | | | | | | | | * Replace some non-deterministic lazy folds with strict folds. * Replace some O(n log n) folds in deterministic order with O(n) non-deterministic folds. * Replace some folds with set-operations on the underlying IntMaps. This reduces max residency when compiling `nofib/spectral/simple/Main.hs` with -O0 by about 1%. Maximum residency when compiling Cabal also seems reduced on the order of 3-9%.
* hadrian: Tell testsuite driver about LLVM availabilityBen Gamari2020-05-131-1/+2
| | | | | | This reflects the logic present in the Make build system into Hadrian. Fixes #18167.
* Ensure that printMinimalImports closes handleBen Gamari2020-05-131-3/+2
| | | | Fixes #18166.
* Handle single unused importJeff Happily2020-05-135-5/+12
|
* GHCi: Add link to the user's guide in help messageTakenobu Tani2020-05-131-0/+4
| | | | | | | This commit adds a link to the user's guide in ghci's `:help` message. Newcomers could easily reach to details of ghci.
* Tweak man page for ghc commandTakenobu Tani2020-05-132-1/+6
| | | | | | | | | | This commit updates the ghc command's man page as followings: * Enable `man_show_urls` to show URL addresses in the `DESCRIPTION` section of ghc.rst, because sphinx currently removes hyperlinks for man pages. * Add a `SEE ALSO` section to point to the GHC homepage
* Document (->) using inferred quantification for its runtime representations.Baldur Blöndal2020-05-134-6/+26
| | | | Fixes #18142.
* fix(documentation): Fix the RST links to GHC.PrimHécate2020-05-133-5/+4
|
* Factor out HsPatSigType for pat sigs/RULE term sigs (#16762)Ryan Scott2020-05-1318-109/+246
| | | | | | | | | | | | | | | This implements chunks (2) and (3) of https://gitlab.haskell.org/ghc/ghc/issues/16762#note_270170. Namely, it introduces a dedicated `HsPatSigType` AST type, which represents the types that can appear in pattern signatures and term-level `RULE` binders. Previously, these were represented with `LHsSigWcType`. Although `LHsSigWcType` is isomorphic to `HsPatSigType`, the intended semantics of the two types are slightly different, as evidenced by the fact that they have different code paths in the renamer and typechecker. See also the new `Note [Pattern signature binders and scoping]` in `GHC.Hs.Types`.
* Don't reload environment files on every setSessionDynFlagsArtem Pelenitsyn2020-05-136-3/+34
| | | | | | | | Makes `interpretPackageEnv` (which loads envirinment files) a part of `parseDynamicFlags` (parsing command-line arguments, which is typically done once) instead of `setSessionDynFlags` (which is typically called several times). Making several (transitive) calls to `interpretPackageEnv`, as before, caused #18125 #16318, which should be fixed now.
* hadrian: add a --freeze2 option to freeze stage 1 and 2Alp Mestanogullari2020-05-133-4/+20
|
* Predicate, Equivalence derive via `.. -> a -> All'Baldur Blöndal2020-05-131-36/+132
|
* doc: Reformulate the opening paragraph of Ch. 4 in User's guideIvan-Yudin2020-05-131-9/+11
| | | | | | | | | Removes mentioning of Hugs (it is not helpful for new users anymore). Changes the wording for the rest of the paragraph. Fixes #18132.
* testsuite: Add testcase for #18129Ben Gamari2020-05-132-0/+53
|
* testsuite: Print sign of performance changesBen Gamari2020-05-131-2/+2
| | | | | Executes the minor formatting change in the tabulated performance changes suggested in #18135.
* users-guide: Add discussion of shared object namingBen Gamari2020-05-132-1/+10
| | | | Fixes #18074.
* CprAnal: Don't attach CPR sigs to expandable bindings (#18154)Sebastian Graf2020-05-1329-111/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, look through expandable unfoldings in `cprTransform`. See the new Note [CPR for expandable unfoldings]: ``` Long static data structures (whether top-level or not) like xs = x1 : xs1 xs1 = x2 : xs2 xs2 = x3 : xs3 should not get CPR signatures, because they * Never get WW'd, so their CPR signature should be irrelevant after analysis (in fact the signature might even be harmful for that reason) * Would need to be inlined/expanded to see their constructed product * Recording CPR on them blows up interface file sizes and is redundant with their unfolding. In case of Nested CPR, this blow-up can be quadratic! But we can't just stop giving DataCon application bindings the CPR property, for example fac 0 = 1 fac n = n * fac (n-1) fac certainly has the CPR property and should be WW'd! But FloatOut will transform the first clause to lvl = 1 fac 0 = lvl If lvl doesn't have the CPR property, fac won't either. But lvl doesn't have a CPR signature to extrapolate into a CPR transformer ('cprTransform'). So instead we keep on cprAnal'ing through *expandable* unfoldings for these arity 0 bindings via 'cprExpandUnfolding_maybe'. In practice, GHC generates a lot of (nested) TyCon and KindRep bindings, one for each data declaration. It's wasteful to attach CPR signatures to each of them (and intractable in case of Nested CPR). ``` Fixes #18154.
* fix printf warning when using with ghc with clang on mingwEmeka Nkurumeh2020-05-131-1/+1
|
* Add few cleanups of the CAF logicBen Gamari2020-05-135-13/+23
| | | | | Give the NameSet of non-CAFfy names a proper newtype to distinguish it from all of the other NameSets floating about.
* docs: Add examples for Data.Semigroup.Arg{Min,Max}Simon Jakobi2020-05-131-0/+7
| | | | Context: #17153
* get-win32-tarballs: Improve diagnostics outputBen Gamari2020-05-131-2/+8
|
* get-win32-tarballs: Fix base URLBen Gamari2020-05-131-1/+0
| | | | Revert a change previously made for testing purposes.
* Pack some of IdInfo fields into a bit fieldÖmer Sinan Ağacan2020-05-131-25/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces residency of compiler quite a bit on some programs. Example stats when building T10370: Before: 2,871,242,832 bytes allocated in the heap 4,693,328,008 bytes copied during GC 33,941,448 bytes maximum residency (276 sample(s)) 375,976 bytes maximum slop 83 MiB total memory in use (0 MB lost due to fragmentation) After: 2,858,897,344 bytes allocated in the heap 4,629,255,440 bytes copied during GC 32,616,624 bytes maximum residency (278 sample(s)) 314,400 bytes maximum slop 80 MiB total memory in use (0 MB lost due to fragmentation) So -3.9% residency, -1.3% bytes copied and -0.4% allocations. Fixes #17497 Metric Decrease: T9233 T9675
* rts/CNF: Fix fixup comparison functionBen Gamari2020-05-134-2/+31
| | | | | | | Previously we would implicitly convert the difference between two words to an int, resulting in an integer overflow on 64-bit machines. Fixes #16992
* rts: Make non-existent linker search path merely a warningBen Gamari2020-05-091-2/+2
| | | | | | | | As noted in #18105, previously this resulted in a rather intrusive error message. This is in contrast to the general expectation that search paths are merely places to look, not places that must exist. Fixes #18105.
* Fix unboxed-sums GC ptr-slot rubbish value (#17791)Sylvain Henry2020-05-0914-42/+135
| | | | | | | This patch allows boot libraries to use unboxed sums without implicitly depending on `base` package because of `absentSumFieldError`. See updated Note [aBSENT_SUM_FIELD_ERROR_ID] in GHC.Core.Make
* Linker.c: initialize n_symbols of ObjectCode with other fieldsÖmer Sinan Ağacan2020-05-081-0/+1
|
* Bump exceptions submodule so that dist-boot is .gitignore'dRyan Scott2020-05-081-0/+0
| | | | | | | | | | | | | `exceptions` is a stage-0 boot library as of commit 30272412fa437ab8e7a8035db94a278e10513413, which means that building `exceptions` in a GHC tree will generate a `dist-boot` directory. However, this directory was not specified in `exceptions`' `.gitignore` file, which causes it to dirty up the current `git` working directory. Accordingly, this bumps the `exceptions` submodule to commit ghc/packages/exceptions@23c0b8a50d7592af37ca09beeec16b93080df98f, which adds `dist-boot` to the `.gitignore` file.
* Add test for #16167nineonine2020-05-083-0/+4
|
* Remove unused SEGMENT_PROT_RWXGreg Steuck2020-05-081-2/+0
| | | | | It's been unused for a year and is problematic on any OS which requires W^X for security.
* Fix specialisation for DFunsSimon Peyton Jones2020-05-086-56/+111
| | | | | | | When specialising a DFun we must take care to saturate the unfolding. See Note [Specialising DFuns] in Specialise. Fixes #18120
* Reject all duplicate declarations involving DuplicateRecordFields (fixes #17965)Adam Gundry2020-05-085-6/+24
| | | | | | This fixes a bug that resulted in some programs being accepted that used the same identifier as a field label and another declaration, depending on the order they appeared in the source code.
* Apply more suggestions from Simon JakobiJoseph C. Sible2020-05-081-4/+4
|
* Apply suggestion to libraries/base/Data/Monoid.hsJoseph C. Sible2020-05-081-1/+1
|
* Document lawlessness of Ap's Num instanceJoseph C. Sible2020-05-081-0/+26
|
* Add `forAllOrNothing` function with noteJohn Ericson2020-05-083-31/+46
|
* A few tiny style nits with renamingJohn Ericson2020-05-082-9/+10
| | | | | | | | - Use case rather than guards that repeatedly scrutenize same thing. - No need for view pattern when `L` is fine. - Use type synnonym to convey the intent like elsewhere.
* Rename local `real_fvs` to `implicit_vs`John Ericson2020-05-081-4/+6
| | | | | It doesn't make sense to call the "free" variables we are about to implicitly bind the real ones.
* HsSigWcTypeScoping: Pull in documentation from stray locationJohn Ericson2020-05-081-14/+16
|
* Specify kind variables for inferred kinds in base.Baldur Blöndal2020-05-0821-140/+240
|
* doc (Bitraversable): Add examples to BitraversableJulien Debon2020-05-082-3/+68
| | | | | | | | * Add examples to Data.Bitraversable * Fix formatting for (,) in Bitraversable and Bifoldable * Fix mistake on bimapAccumR documentation See #17929
* Add doc examples for BifoldableJulien Debon2020-05-081-7/+581
| | | | See #17929
* Remove further dead code found by a simple Python script.Brian Foley2020-05-0813-192/+14
| | | | | Avoid removing some functions that are part of an API even though they're not used in-tree at the moment.
* Refactoring: Use bindSigTyVarsFV in rnMethodBindsRyan Scott2020-05-061-8/+1
| | | | | | | | | | | | `rnMethodBinds` was explicitly using `xoptM` to determine if `ScopedTypeVariables` is enabled before bringing type variables bound by the class/instance header into scope. However, this `xoptM` logic is already performed by the `bindSigTyVarsFV` function. This patch uses `bindSigTyVarsFV` in `rnMethodBinds` to reduce the number of places where we need to consult if `ScopedTypeVariables` is on. This is purely refactoring, and there should be no user-visible change in behavior.
* Don't use DynFlags in showLinkerState (#17957)Sylvain Henry2020-05-062-5/+7
|
* Move LeadingUnderscore into Platform (#17957)Sylvain Henry2020-05-066-17/+13
| | | | | Avoid direct use of DynFlags to know if symbols must be prefixed by an underscore.
* ELF linker: increment curSymbol after filling in fields of current entryÖmer Sinan Ağacan2020-05-061-1/+2
| | | | | | | | | The bug was introduced in a8b7cef4d45 which added a field to the `symbols` array elements and then updated this code incorrectly: - oc->symbols[curSymbol++] = nm; + oc->symbols[curSymbol++].name = nm; + oc->symbols[curSymbol].addr = symbol->addr;
* Make isTauTy detect higher-rank contextsRyan Scott2020-05-067-9/+91
| | | | | | | | | Previously, `isTauTy` would only detect higher-rank `forall`s, not higher-rank contexts, which led to some minor bugs observed in #18127. Easily fixed by adding a case for `(FunTy InvisArg _ _)`. Fixes #18127.