| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zubin observed that the bindists contains the utility library
linters-common. There are two options:
1. Make sure only the right files are added into the bindist.. a bit
tricky due to the non-trivial structure of the lib directory.
2. Remove the bad files once they get copied in.. a bit easier
So I went for option 2 but we perhaps should go for option 1 in the
future.
Fixes #21203
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove unused functions exprToCoercion_maybe, applyTypeToArg,
typeMonoPrimRep_maybe, runtimeRepMonoPrimRep_maybe.
- Replace orValid with a simpler check
- Use splitAtList in applyTysX
- Remove calls to extra_clean in the testsuite; it does not do anything.
Metric Decrease:
T18223
|
|
|
|
| |
Closes #20640
|
|
|
|
| |
This implements CLC proposal #49
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `ty_co_match` function ignored the implicit RuntimeRep coercions
that occur in a `FunCo`. Even though a comment explained that this
should be fine, #21205 showed that it could result in discarding a
RuntimeRep coercion, and thus discarding an important cast entirely.
With this patch, we first match the kinds in `ty_co_match`.
Fixes #21205
-------------------------
Metric Increase:
T12227
T18223
-------------------------
|
| |
|
|
|
|
|
|
|
|
| |
Previously, the warnings and errors were given and returned as a tuple
(Messages PsWarnings, Messages PsErrors). Now, it's just PsMessages.
This, together with the HsParsedModule the parser plugin gets and
returns, has been wrapped up as ParsedResult.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes this failure:
=====> 1 of 1 [0, 0, 0]
T13366(normal) 1 of 1 [0, 0, 0] Compile failed (exit code 1) errors were:
<no location info>: error:
user specified .o/.so/.DLL could not be loaded (File not found)
Whilst trying to load: (dynamic) stdc++
Additional directories searched: (none)
*** unexpected failure for T13366(normal)
|
|
|
|
|
|
|
|
|
|
| |
In ChromeOS and Gentoo we want the ability to use LLVM ar
instead of GNU ar even though both are installed, thus we
pass (for eg) AR=llvm-ar to configure.
Unfortunately GNU ar always gets picked regardless of the
AR setting because the check does not consider the AR var
when setting fp_prog_ar, hence this fix.
|
|
|
|
|
| |
It appears that running the script directly does nothing (no info is
printed about saving the cache).
|
|
|
|
|
| |
It seems I forgot to update this to reflect the current state of
gen_ci.hs
|
|
|
|
|
| |
The CONC_MARK_END event description didn't mention its payload.
Clarify the meaning of the CREATE_TASK's payload.
|
|
|
|
|
|
|
|
|
| |
* The size of End concurrent mark phase looks wrong and, it used to be 4 and now it's 0.
* The size of Task create is wrong, used to be 18 and now 14.
* The event ticky-ticky entry counter begin sample has the wrong name
* The event ticky-ticky entry counter being sample has the wrong size, was 0 now 32.
Closes #21070
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC uses global initializers for a number of things including
cost-center registration, info-table provenance registration, and setup
of foreign exports. Previously, the global initializer arrays which
referenced these initializers would live in the object file of the C
stub, which would then be merged into the main object file of the
module.
Unfortunately, this approach is no longer tenable with the move to
Clang/LLVM on Windows (see #21019). Specifically, lld's PE backend does
not support object merging (that is, the -r flag). Instead we are now
rather packaging a module's object files into a static library. However,
this is problematic in the case of initializers as there are no
references to the C stub object in the archive, meaning that the linker
may drop the object from the final link.
This patch refactors our handling of global initializers to instead
place initializer arrays within the object file of the module to which
they belong. We do this by introducing a Cmm data declaration containing
the initializer array in the module's Cmm stream. While the initializer
functions themselves remain in separate C stub objects, the reference
from the module's object ensures that they are not dropped from the
final link.
In service of #21068.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixes #21303
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, 'pcPrimTyCon', the function used to define a primitive type,
was taking a PrimRep, only to convert it to a RuntimeRep. Now it takes
a RuntimeRep directly.
Moved primRepToRuntimeRep to GHC.Types.RepType. It is now
located next to its inverse function runtimeRepPrimRep.
Now GHC.Builtin.Types.Prim no longer mentions PrimRep, and GHC.Types.RepType
no longer imports GHC.Builtin.Types.Prim.
Removed unused functions `primRepsToRuntimeRep` and `mkTupleRep`.
Removed Note [PrimRep and kindPrimRep] - it was never referenced,
didn't belong to Types.Prim, and Note [Getting from RuntimeRep to
PrimRep] is more comprehensive.
|
|
|
|
|
| |
This Note was renamed in 2535a6716202253df74d8190b028f85cc6d21b72 yet
this occurrence was not updated.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when the parser produced non-fatal errors (i.e. it produced
errors but the 'PState' is 'POk'), compilation would be aborted before
the 'parsedResultAction' of any plugin was invoked. This commit changes
that, so that such that 'parsedResultAction' gets collections of
warnings and errors as argument, and must return them after potentially
modifying them.
Closes #20803
|
|
|
|
| |
Fixes #21306
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When passed a combination of `-N` and `-qn` options the cpu time for
garbage collection was being vastly overcounted because the counters
were not being zeroed appropiately.
When -qn1 is passed, only 1 of the N avaiable GC threads is chosen to
perform work, the rest are idle. At the end of the GC period, stat_endGC
traverses all the GC threads and adds up the elapsed time from each of
them. For threads which didn't participate in this GC, the value of the
cpu time should be zero, but before this patch, the counters were not
zeroed and hence we would count the same elapsed time on many subsequent
iterations (until the thread participated in a GC again).
The most direct way to zero these fields is to do so immediately after
the value is added into the global counter, after which point they are
never used again.
We also tried another approach where we would zero the counter in
yieldCapability but there are some (undiagnosed) siations where a
capbility would not pass through yieldCapability before the GC ended and
the same double counting problem would occur.
Fixes #21082
|
|
|
|
|
|
|
|
|
|
|
| |
This patchs separates whether -DDEBUG is enabled (i.e. whether debug
assertions are enabled) from whether we are using the debugged RTS
(i.e. GhcDebugged = YES).
This means that we properly skip tests which have been marked with
`when(compiler_debugged(), skip)`.
Fixes #21113, #21153 and #21234
|
| |
|
|
|
|
| |
Fixes #20935 and #20924
|
|
|
|
|
|
|
|
|
|
|
| |
Before, `GHC.ThToHs` was very inconsistent about where various sub-expressions
would get the same `SrcSpan` from the original TH splice location or just a
generic `noLoc` `SrcSpan`. I have ripped out all uses of `noLoc` in favor of
the former instead, and I have added a
`Note [Source locations within TH splices]` to officially enshrine this
design choice.
Fixes #21299.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code
let ;x =1
Captures the semicolon annotation, but did not widen the anchor in the
ValBinds.
Fix that.
Closes #20247
|
|
|
|
|
|
|
|
|
|
|
| |
Some build systems use "make show" to query facts about the bindist, for
example:
```
make show VALUE=ProjectVersion > version
```
to determine the ProjectVersion
|
| |
|
| |
|
| |
|
|
|
|
| |
Close #21208.
|
|
|
|
|
|
|
| |
Unfortunately we are simply not currently in a good position to robustly
ship binary distributions which link against C++ code like simdutf.
Fixes #20724.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch basically deletes some ad-hoc handling of Cabal Flags and
replaces it with a correct query of the LocalBuildInfo. The flags in the
local build info can be modified by users by passing hadrian options
For example (!4331)
```
*.genapply.cabal.configure.opts += --flags=unregisterised
```
And all the flags specified by the `Cabal Flags` builder were already
passed to configure properly using `--flags`.
|
|
|
|
|
|
| |
This patch corrects some markdown.
[skip ci]
|
|
|
|
|
|
|
|
| |
- Factorize Tidy options into TidyOpts datatype. Initialize it in
GHC.Driver.Config.Tidy
- Same thing for StaticPtrOpts
- Perform lookups of unpackCString[Utf8]# once in initStaticPtrOpts
instead of for every use of mkStringExprWithFS
|
|
|
|
| |
Fixes #17830
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a new script (.gitlab/gen_ci.hs) which generates
a yaml file (.gitlab/jobs.yaml) which contains explicit descriptions for
all the jobs we want to run. The jobs are separated into three
categories:
* validate - jobs run on every MR
* nightly - jobs run once per day on the master branch
* release - jobs for producing release artifacts
The generation script is a Haskell program which includes a DSL for
specifying the different jobs. The hope is that it's easier to reason
about the different jobs and how the variables are merged together
rather than the unclear and opaque yaml syntax. The goal is to fix
issues like #21190 once and for all..
The `.gitlab/jobs.yaml` can be generated by running the `.gitlab/generate_jobs`
script. You have to do this manually.
Another consequence of this patch is that we use hadrian for all the
validate, nightly and release builds on all platforms.
|
|
|
|
|
|
|
| |
These dependencies would affect the demand signature depending on
various rules and so on.
Fixes #21271
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you inspect the inside of a wrapper script for hsc2hs you will see
that the cflag and lflag values are concatenated incorrectly.
```
HSC2HS_EXTRA="--cflag=-U__i686--lflag=-fuse-ld=gold"
```
It should instead be
```
HSC2HS_EXTRA="--cflag=-U__i686 --lflag=-fuse-ld=gold"
```
Fixes #21221
|
| |
|
|
|
|
|
|
|
|
| |
This test checks that you are allowed to explicitly supply object files
for dependencies even if you haven't got the shared object for that
library yet.
Fixes #21035
|
|
|
|
|
|
|
|
|
|
|
|
| |
Partial FUN apps like `(->) Bool` aren't detected by `splitFunTy_maybe`.
A silly oversight that is easily fixed by replacing `splitFunTy_maybe` with a
guard in the `splitTyConApp_maybe` case.
But fortunately, Simon nudged me into rewriting the whole `isRecDataCon`
function in a way that makes it much shorter and hence clearer which DataCons
are actually considered as recursive.
Fixes #21265.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As explained in `Note [Gathering and simplifying constraints for DeriveAnyClass]`
in `GHC.Tc.Deriv.Infer`, `DeriveAnyClass` infers instance contexts by emitting
implication constraints. Previously, these implication constraints were
constructed by hand. This is a terribly trick thing to get right, as it
involves a delicate interplay of skolemisation, metavariable instantiation, and
`TcLevel` bumping. Despite much effort, we discovered in #20719 that the
implementation was subtly incorrect, leading to valid programs being rejected.
While we could scrutinize the code that manually constructs implication
constraints and repair it, there is a better, less error-prone way to do
things. After all, the heart of `DeriveAnyClass` is generating code which
fills in each class method with defaults, e.g., `foo = $gdm_foo`. Typechecking
this sort of code is tantamount to calling `tcSubTypeSigma`, as we much ensure
that the type of `$gdm_foo` is a subtype of (i.e., more polymorphic than) the
type of `foo`. As an added bonus, `tcSubTypeSigma` is a battle-tested function
that handles skolemisation, metvariable instantiation, `TcLevel` bumping, and
all other means of tricky bookkeeping correctly.
With this insight, the solution to the problems uncovered in #20719 is simple:
use `tcSubTypeSigma` to check if `$gdm_foo`'s type is a subtype of `foo`'s
type. As a side effect, `tcSubTypeSigma` will emit exactly the implication
constraint that we were attempting to construct by hand previously. Moreover,
it does so correctly, fixing #20719 as a consequence.
This patch implements the solution thusly:
* The `PredSpec` data type (previously named `PredOrigin`) is now split into
`SimplePredSpec`, which directly stores a `PredType`, and `SubTypePredSpec`,
which stores the actual and expected types in a subtype check.
`SubTypePredSpec` is only used for `DeriveAnyClass`; all other deriving
strategies use `SimplePredSpec`.
* Because `tcSubTypeSigma` manages the finer details of type variable
instantiation and constraint solving under the hood, there is no longer any
need to delicately split apart the method type signatures in
`inferConstraintsAnyclass`. This greatly simplifies the implementation of
`inferConstraintsAnyclass` and obviates the need to store skolems,
metavariables, or given constraints in a `ThetaSpec` (previously named
`ThetaOrigin`). As a bonus, this means that `ThetaSpec` now simply becomes a
synonym for a list of `PredSpec`s, which is conceptually much simpler than it
was before.
* In `simplifyDeriv`, each `SubTypePredSpec` results in a call to
`tcSubTypeSigma`. This is only performed for its side effect of emitting
an implication constraint, which is fed to the rest of the constraint solving
machinery in `simplifyDeriv`. I have updated
`Note [Gathering and simplifying constraints for DeriveAnyClass]` to explain
this in more detail.
To make the changes in `simplifyDeriv` more manageable, I also performed some
auxiliary refactoring:
* Previously, every iteration of `simplifyDeriv` was skolemising the type
variables at the start, simplifying, and then performing a reverse
substitution at the end to un-skolemise the type variables. This is not
necessary, however, since we can just as well skolemise once at the
beginning of the `deriving` pipeline and zonk the `TcTyVar`s after
`simplifyDeriv` is finished. This patch does just that, having been made
possible by prior work in !7613. I have updated `Note [Overlap and deriving]`
in `GHC.Tc.Deriv.Infer` to explain this, and I have also left comments on
the relevant data structures (e.g., `DerivEnv` and `DerivSpec`) to explain
when things might be `TcTyVar`s or `TyVar`s.
* All of the aforementioned cleanup allowed me to remove an ad hoc
deriving-related in `checkImplicationInvariants`, as all of the skolems in
a `tcSubTypeSigma`–produced implication constraint should now be `TcTyVar`
at the time the implication is created.
* Since `simplifyDeriv` now needs a `SkolemInfo` and `UserTypeCtxt`, I have
added `ds_skol_info` and `ds_user_ctxt` fields to `DerivSpec` to store these.
Similarly, I have also added a `denv_skol_info` field to `DerivEnv`, which
ultimately gets used to initialize the `ds_skol_info` in a `DerivSpec`.
Fixes #20719.
|
|
|
|
| |
filter has fusion rules that filterOut lacks
|