| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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%.
|
|
|
|
|
|
| |
This reflects the logic present in the Make build system into Hadrian.
Fixes #18167.
|
|
|
|
| |
Fixes #18166.
|
| |
|
|
|
|
|
|
|
| |
This commit adds a link to the user's guide in ghci's
`:help` message.
Newcomers could easily reach to details of ghci.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Fixes #18142.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Removes mentioning of Hugs
(it is not helpful for new users anymore).
Changes the wording for the rest of the paragraph.
Fixes #18132.
|
| |
|
|
|
|
|
| |
Executes the minor formatting change in the tabulated performance
changes suggested in #18135.
|
|
|
|
| |
Fixes #18074.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Give the NameSet of non-CAFfy names a proper newtype to distinguish it
from all of the other NameSets floating about.
|
|
|
|
| |
Context: #17153
|
| |
|
|
|
|
| |
Revert a change previously made for testing purposes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Previously we would implicitly convert the difference between two words
to an int, resulting in an integer overflow on 64-bit machines.
Fixes #16992
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
| |
It's been unused for a year and is problematic on any OS which
requires W^X for security.
|
|
|
|
|
|
|
| |
When specialising a DFun we must take care to saturate the
unfolding. See Note [Specialising DFuns] in Specialise.
Fixes #18120
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
| |
It doesn't make sense to call the "free" variables we are about to
implicitly bind the real ones.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Add examples to Data.Bitraversable
* Fix formatting for (,) in Bitraversable and Bifoldable
* Fix mistake on bimapAccumR documentation
See #17929
|
|
|
|
| |
See #17929
|
|
|
|
|
| |
Avoid removing some functions that are part of an API even
though they're not used in-tree at the moment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
| |
Avoid direct use of DynFlags to know if symbols must be prefixed by an
underscore.
|
|
|
|
|
|
|
|
|
| |
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;
|
|
|
|
|
|
|
|
|
| |
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.
|