| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Hadrian bootstrapping looks up where to find ghc_pkg, but the same
logic was not in place for hsc2hs which meant we could fail to
find the appropriate hsc2hs executabe when bootstrapping Hadrian.
This patch adds that missing logic.
|
|
|
|
|
|
|
|
| |
This patch adds the ability to pass options to Hsc2Hs as Hadrian
key/value settings, in the same way as cabal configure options,
using the syntax:
*.*.hsc2hs.run.opts += ...
|
|
|
|
| |
Closes #21724
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The install_includes for the RTS package used to be put in the top-level
./include folder but this would lead to confusing things happening if
you installed multiple GHC versions side-by-side.
We don't need this folder anymore because install-includes
is honoured properly by cabal and the relevant header files already
copied in by the cabal installation process.
If you want to depend on the header files for the RTS in a Haskell
project then you just have to depend on the `rts` package and the
correct include directories will be provided for you.
If you want to depend on the header files in a standard C project then
you should query ghc-pkg to get the right paths.
```
ghc-pkg field rts include-dirs --simple-output
```
Fixes #21609
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Despite this code having been present in the core-to-bytecode
implementation, I have observed it in the wild starting with 9.2,
causing enormous slowdown in certain situations.
My test case produces the following profiles:
Before:
```
total time = 559.77 secs (559766 ticks @ 1000 us, 1 processor)
total alloc = 513,985,665,640 bytes (excludes profiling overheads)
COST CENTRE MODULE SRC %time %alloc ticks bytes
elem_by Data.OldList libraries/base/Data/OldList.hs:429:1-7 67.6 92.9 378282 477447404296
eqInt GHC.Classes libraries/ghc-prim/GHC/Classes.hs:275:8-14 12.4 0.0 69333 32
$c>>= GHC.Data.IOEnv <no location info> 6.9 0.6 38475 3020371232
```
After:
```
total time = 89.83 secs (89833 ticks @ 1000 us, 1 processor)
total alloc = 39,365,306,360 bytes (excludes profiling overheads)
COST CENTRE MODULE SRC %time %alloc ticks bytes
$c>>= GHC.Data.IOEnv <no location info> 43.6 7.7 39156 3020403424
doCase GHC.StgToByteCode compiler/GHC/StgToByteCode.hs:(805,1)-(1054,53) 2.5 7.4 2246 2920777088
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configure's --enable-ld-override functionality is intended to ensure
that we don't rely on ld.bfd, which tends to be slow and buggy, on
Linux and Windows. However, on Darwin the lack of sensible package
management makes it extremely easy for users to have awkward mixtures of
toolchain components from, e.g., XCode, the Apple Command-Line Tools
package, and homebrew. This leads to extremely confusing problems
like #21712.
Here we avoid this by simply giving up on linker selection on Darwin
altogether. This isn't so bad since the Apple ld64 linker has decent
performance and AFAICT fairly reliable.
Closes #21712.
|
| |
|
|
|
|
|
|
| |
Previously the check_for_gold_t22266 configure check could result in
spurious warnings coming from the linker being blurted to stderr.
Suppress these by piping stderr to /dev/null.
|
|
|
|
| |
Fixes #21506.
|
|
|
|
|
|
|
|
|
| |
The call sites in `Driver.Main` are duplicative, but this is good,
because the next step is to remove `InteractiveContext` from `Core.Lint`
into `Core.Lint.Interactive`.
Also further clean up `Core.Lint` to use a better configuration record
than the one we initially added.
|
|
|
|
|
|
|
|
| |
Currently the `$make` variable is used without being set in `validate`'s
Hadrian path, which uses make to install the binary distribution. Fix
this.
Fixes #21687.
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were various issues with testing the stage1 compiler..
1. The wrapper was not being built
2. The wrapper was picking up the stage0 package database and trying to
load prelude from that.
3. The wrappers never worked on windows so just don't support that for
now.
Fixes #21072
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clock_gettime reports the combined total or user AND system time so in
order to replicate it with getrusage we need to add both system and user
time together.
See https://stackoverflow.com/questions/7622371/getrusage-vs-clock-gettime
Some sample measurements when building Cabal with this patch
t1: rusage
t2: clock_gettime
t1: 62347518000; t2: 62347520873
t1: 62395687000; t2: 62395690171
t1: 62432435000; t2: 62432437313
t1: 62478489000; t2: 62478492465
t1: 62514990000; t2: 62514992534
t1: 62515479000; t2: 62515480327
t1: 62515485000; t2: 62515486344
Fixes #21656
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #21682
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch refactors hasFixedRuntimeRep_remainingValArgs, renaming it
to tcRemainingValArgs. The logic is moved to rebuildHsApps, which
ensures consistent behaviour across tcApp and quickLookArg1/tcEValArg.
This patch also refactors the treatment of stupid theta for data
constructors, changing the place we drop stupid theta arguments
from dsConLike to mkDataConRep (now the datacon wrapper drops these
arguments).
We decided not to implement PHASE 2 of the FixedRuntimeRep plan for
these remaining ValArgs. Future directions are outlined on the wiki:
https://gitlab.haskell.org/ghc/ghc/-/wikis/Remaining-ValArgs
Fixes #21544 and #21650
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to process the rhs of non-recursive bindings and their body
using the same env. If we had something like
let x = ... x ...
this caused trouble because the two xs refer to different binders
but we would substitute both for a new binder x2 causing out of scope
errors.
We now simply use two different envs for the rhs and body in cse_bind.
It's all explained in the Note [Separate envs for let rhs and body]
Fixes #21685
|
|
|
|
| |
Co-Authored-By: Andre Marianiello <andremarianiello@users.noreply.github.com>
|
|
|
|
|
|
|
| |
It is redundant information and a source of needless version control
conflicts when multiple MRs are changing the deps list.
Just printing the list and not also its length is fine.
|
|
|
|
|
|
|
|
|
|
|
| |
In the Specialiser, we missed one more call to
bringFloatedDictsIntoScope (see #21391).
This omission led to #21689. The problem is that the call
to `rewriteClassOps` needs to have in scope any dictionaries
floated out of the arguments we have just specialised.
Easy fix.
|
|
|
|
|
|
| |
Replaces uses of `TcRnUnknownMessage` with proper diagnostics
constructors in `GHC.Tc.Gen.Match`, `GHC.Tc.Gen.Pat`, and
`GHC.Tc.Gen.Sig`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes #20312
It deprecates "TypeInType" extension
according to the following proposal:
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0083-no-type-in-type.rst
It has been already implemented.
The migration strategy:
1. Disable TypeInType
2. Enable both DataKinds and PolyKinds extensions
Metric Decrease:
T16875
|
|
|
|
|
|
| |
Finishes what !7467 (closed) started.
Progress towards #17957
|
|
|
|
|
| |
We have the length already, so we might as well use that rather than
O(n) recomputing it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As proposed in
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7508#note_432877 and
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7508#note_434676,
`GHC.HsToCore.Ticks` is about ticks, breakpoints are separate and
backend-specific (only for the bytecode interpreter), and mix entry
writing is just for HPC.
With this split we separate out those interpreter- and HPC-specific
its, and keep the main `GHC.HsToCore.Ticks` agnostic.
Also, instead of passing the reversed list and count around, we use
`SizedSeq` which abstracts over the algorithm. This is much nicer to
avoid noise and prevents bugs.
(The bugs are not just hypothetical! I missed up the reverses on an
earlier draft of this commit.)
|
|
|
|
|
|
| |
The old name made it confusing why disabling HPC didn't disable the
entire pass. The name makes it clear --- there are other reasons to add
ticks in addition.
|
|
|
|
|
|
| |
No need to inline traversing a maybe for `mkModBreaks`. And better to
make each function do one thing and let the caller deside when than
scatter the decision making and make the caller seem more imperative.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This is a follow-up to !7247 (closed) making the inclusion of compact unwinding
sections the default.
Also a slight refactoring/simplification of the flag handling to add
-fno-compact-unwind.
|
|
|
|
| |
This allows us to see the output of hadrian while it is doing the setup.
|
|
|
|
|
|
| |
To current `master`.
(cherry picked from commit fbb59c212415188486aafd970eafef170516356a)
|
|
|
|
|
|
|
|
|
| |
Metric Decrease:
T5631
Metric Increase:
T18223
(cherry picked from commit 55fcee30cb3281a66f792e8673967d64619643af)
|
|
|
|
| |
Fixes ghc/ghc#21675.
|
| |
|
|
|
|
|
|
|
|
|
| |
Since we started producing source dists with hadrian we stopped copying
in the files created by ./boot which adds a dependency on python3 and
autoreconf. This adds back in the files which were created by running
configure.
Fixes #21673 #21672 and #21626
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch to a pure Haskell implementation of base:GHC.Unicode, based on the implementation of the package unicode-data (https://github.com/composewell/unicode-data/).
Approved by CLC as per https://github.com/haskell/core-libraries-committee/issues/59#issuecomment-1132106691.
- Remove current Unicode cbits.
- Add generator for Unicode property files from Unicode Character Database.
- Generate internal modules.
- Update GHC.Unicode.
- Add unicode003 test for general categories and case mappings.
- Add Python scripts to check 'base' Unicode tests outputs and characters properties.
Fixes #21375
-------------------------
Metric Decrease:
T16875
Metric Increase:
T4029
T18304
haddock.base
-------------------------
|
|
|
|
| |
Fixes #21619
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit redefines the structure of Splices in the AST.
We get rid of `HsSplice` which used to represent typed and untyped
splices, quasi quotes, and the result of splicing either an expression,
a type or a pattern.
Instead we have `HsUntypedSplice` which models an untyped splice or a
quasi quoter, which works in practice just like untyped splices.
The `HsExpr` constructor `HsSpliceE` which used to be constructed with
an `HsSplice` is split into `HsTypedSplice` and `HsUntypedSplice`. The
former is directly constructed with an `HsExpr` and the latter now takes
an `HsUntypedSplice`.
Both `HsType` and `Pat` constructors `HsSpliceTy` and `SplicePat` now
take an `HsUntypedSplice` instead of a `HsSplice` (remember only
/untyped splices/ can be spliced as types or patterns).
The result of splicing an expression, type, or pattern is now
comfortably stored in the extension fields `XSpliceTy`, `XSplicePat`,
`XUntypedSplice` as, respectively, `HsUntypedSpliceResult (HsType
GhcRn)`, `HsUntypedSpliceResult (Pat GhcRn)`, and `HsUntypedSpliceResult
(HsExpr GhcRn)`
Overall the TTG extension points are now better used to
make invalid states unrepresentable and model the progression between
stages better.
See Note [Lifecycle of an untyped splice, and PendingRnSplice]
and Note [Lifecycle of an typed splice, and PendingTcSplice] for more
details.
Updates haddock submodule
Fixes #21263
-------------------------
Metric Decrease:
hard_hole_fits
-------------------------
|
|
|
|
|
| |
UntypedSpliceFlavour was only used in the client-specific `GHC.Hs.Expr`
but was defined in the client-independent L.H.S.Expr.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
too hard
Progress towards #17957
Because of `CoreM`, I did not move the `DynFlags` and `HscEnv` to other
modules as thoroughly as I usually do. This does mean that risk of
`DynFlags` "creeping back in" is higher than it usually is.
After we do the same process to the other Core passes, and then figure
out what we want to do about `CoreM`, we can finish the job started
here.
That is a good deal more work, however, so it certainly makes sense to
land this now.
|