| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #16376 showed the danger of failing to report an error
that exists only in the unsolved constraints, if an exception
is raised (via failM).
Well, the commit 5c1f268e (Fail fast in solveLocalEqualities)
did just that -- i.e. it found errors in the constraints, and
called failM to avoid a misleading cascade.
So we need to be sure to call captureTopConstraints to report
those insolubles. This was wrong in TcRnDriver.tcRnExpr and
in TcRnDriver.tcRnType.
As a result the error messages from test T13466 improved slightly,
a happy outcome.
|
|
|
|
|
| |
Also, replace some tabs with spaces to avoid a "mixed indent" warning that vim
gives me.
|
|
|
|
|
|
|
|
|
|
| |
This partly resolves #16325 (https://ghc.haskell.org/trac/ghc/ticket/16325).
As previously discussed in https://github.com/snowleopard/hadrian/issues/667,
we do not need the symlink traversal code in build scripts. However, it
appears we forgot to delete this code from our Stack-based build scripts,
which led to placing all build artefacts in an unexpected location when
using Hadrian in combination with symlink trees. This commit fixes this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- introduce a -k/--keep-test-files flag to prevent cleanup
- add -dstg-lint to the options that are always passed to tests
- infer library ways from the compiler to be tested instead of getting them
from the flavour (like make)
- likewise for figuring out whether the compiler to be tested is "debugged"
- specify config.exeext
- correctly specify config.in_tree_compiler, instead of always passing True
- fix formatting of how we pass a few test options
- add (potential) extensions to check-* program names
- build check-* programs with the compiler to be tested
- set TEST_HC_OPTS_INTERACTIVE and PYTHON env vars when running tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #10069 revealed that small NOINLINE functions didn't get split
into worker and wrapper. This was due to `certainlyWillInline`
saying that any unfoldings with a guidance of `UnfWhen` inline
unconditionally. That isn't the case for NOINLINE functions, so we
catch this case earlier now.
Nofib results:
--------------------------------------------------------------------------------
Program Allocs Instrs
--------------------------------------------------------------------------------
fannkuch-redux -0.3% 0.0%
gg +0.0% +0.1%
maillist -0.2% -0.2%
minimax 0.0% -0.8%
--------------------------------------------------------------------------------
Min -0.3% -0.8%
Max +0.0% +0.1%
Geometric Mean -0.0% -0.0%
Fixes #10069.
-------------------------
Metric Increase:
T9233
-------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The type-variables-escaping-their-scope-via-kinds check in
`TcValidity` was failing to properly expand type synonyms, which led
to #16391. This is easily fixed by using `occCheckExpand` before
performing the validity check.
Along the way, I refactored this check out into its own function,
and sprinkled references to Notes to better explain all of the moving
parts. Many thanks to @simonpj for the suggestions.
Bumps the haddock submodule.
|
|
|
|
|
|
|
|
|
| |
We revert CAFs when loading/adding modules in ghci (presumably to refresh
execution states and to allow for object code to be unloaded from the runtime).
However, with `-fexternal-interpreter` enabled, we are only doing it in the
ghci process instead of the external interpreter process where the cafs are
allocated and computed. This makes sure that revertCAFs is done in the
appropriate process no matter if that flag is present or not.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Also account for testsuite metric drift.
Metric Increase:
haddock.Cabal
haddock.base
T14683
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Now since we have been a bit more stringent in testsuite cleanliness we
have been marking a lot of tests as fragile using the `skip` modifier.
However, this unfortunately means that we lose the association with the
ticket number documenting the fragility.
Here we introduce `fragile` and `fragile_for` to retain this
information.
|
|
|
|
| |
This was the suggested change in !176 but missed the batch merge (!263).
|
|
|
|
|
|
|
|
|
| |
`instance forall c. c` claimed that `c` was out of scope because the
renamer was invoking `lookupGlobalOcc` on `c` (in
`RnNames.getLocalNonValBinders`) without binding `c` first. To avoid
this, this patch changes GHC to invoke `lookupGlobalOcc_maybe` on `c`
instead, and if that returns `Nothing`, then bail out, resulting
in a better error message.
|
| |
|
|
|
|
|
|
|
|
| |
In the concurrent nonmoving collector we will need the ability to call
`traverseWeakPtrList` concurrently with minor generation collections.
This global state stands in the way of this. However, refactoring it
away is straightforward since this list only persists the length of a
single GC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #16187.
This patch fixes various path concatenation issues to allow functioning
builds with hadrian when the build root location is specified with an
absolute path.
Remarks:
- The path concatenation operator (-/-) now handles absolute second operands
appropriately. Its behavior should match that of POSIX (</>) in this
regard.
- The `getDirectoryFiles*` family of functions only searches for matches
under the directory tree rooted by its first argument; all of the
results are also relative to this root. If the first argument is the
empty string, the current working directory is used.
This patch passes the appropriate directory (almost always either `top`
or `root`), and subsequently attaches that directory prefix so that
the paths refer to the appropriate files.
- Windows `tar` does not like colons (':') in paths to archive files, it
tries to resolve them as remote paths. The `--force-local` option
remedies this, and is applied on windows builds.
|
|
|
|
|
|
|
|
| |
The test case in #15918 no longer triggers an `ASSERT` failure on
GHC HEAD, likely due to commit
682783828275cca5fd8bf5be5b52054c75e0e22c (`Make a smart mkAppTyM`).
This patch adds a regression test for #15918 to finally put it to
rest.
|
| |
|
|
|
|
|
| |
These include printLargeAndPinnedObjects, printWeakLists, and
printStaticObjects. These are generally useful things to have.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The splitter is an evil Perl script that processes assembler code.
Its job can be done better by the linker's --gc-sections flag. GHC
passes this flag to the linker whenever -split-sections is passed on
the command line.
This is based on @DemiMarie's D2768.
Fixes Trac #11315
Fixes Trac #9832
Fixes Trac #8964
Fixes Trac #8685
Fixes Trac #8629
|
|
|
|
|
|
|
|
| |
This addresses Trac #16208 by marking newtype wrapper
unfoldings as compulsory.
Furthermore, we can remove the special case for newtypes
in exprIsConApp_maybe (introduced in 7833cf407d1f).
|
|
|
|
|
|
| |
expected changes on the current commit.
Trac #16359
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes two rather gnarly test cases:
* Trac #16342 (mutual recursion)
See Note [Tricky scoping in generaliseTcTyCon]
* Trac #16221 (shadowing)
See Note [Unification variables need fresh Names]
The main changes are:
* Substantial reworking of TcTyClsDecls.generaliseTcTyCon
This is the big change, and involves the rather tricky
function TcHsSyn.zonkRecTyVarBndrs.
See Note [Inferring kinds for type declarations] and
Note [Tricky scoping in generaliseTcTyCon] for the details.
* bindExplicitTKBndrs_Tv and bindImplicitTKBndrs_Tv both now
allocate /freshly-named/ unification variables. Indeed, more
generally, unification variables are always fresh; see
Note [Unification variables need fresh Names] in TcMType
* Clarify the role of tcTyConScopedTyVars.
See Note [Scoped tyvars in a TcTyCon] in TyCon
As usual, this dragged in some more refactoring:
* Renamed TcMType.zonkTyCoVarBndr to zonkAndSkolemise
* I renamed checkValidTelescope to checkTyConTelescope;
it's only used on TyCons, and indeed takes a TyCon as argument.
* I folded the slightly-mysterious reportFloatingKvs into
checkTyConTelescope. (Previously all its calls immediately
followed a call to checkTyConTelescope.) It makes much more
sense there.
* I inlined some called-once functions to simplify
checkValidTyFamEqn. It's less spaghetti-like now.
* This patch also fixes Trac #16251. I'm not quite sure why #16251
went wrong in the first place, nor how this patch fixes it, but
hey, it's good, and life is short.
|
|
|
|
| |
This reverts commit 0e2d300a59b1b5c167d2e7d99a448c8663ba6d7d.
|
|
|
|
| |
This reverts commit e8a08f400744a860d1366c6680c8419d30f7cc2a.
|
| |
|
|
|
|
|
|
| |
RyanGlScott observed in https://github.com/haskell/haddock/issues/1030
that running Haddock tests in GHC's testsuite left some `.hi` files
around in `utils/haddock`. This should fix that problem.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Otherwise these tests break spuriously when core libraries are compiled
with source notes.
|
| |
|
|
|
|
| |
These have been moved to the ghc/ci-images project.
|
| |
|
|
|
|
| |
Python's split() function is used to split on all white space.
|
| |
|
|
|
|
|
|
|
|
|
| |
The initial motivation for this is to have a chance to run the binary
distribution rules in our Windows CI without having to install
sphinx-build and xelatex there, while retaining the ability to
generate haddocks. I just ended up extending this idea a little bit so
as to have control over whether we build haddocks, (sphinx) HTML manuals,
(sphinx) PDF manuals and (sphinx) manpages.
|
|
|
|
|
|
|
|
|
|
| |
The following previously fatal lexer errors are now non-fatal:
* errors about enabling `LambdaCase`
* errors about enabling `NumericUnderscores`
* errors about having valid characters in primitive strings
See #16270
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements GHC proposal 35
(https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0035-forall-arrow.rst)
by adding the ability to write kinds with
visible dependent quantification (VDQ).
Most of the work for supporting VDQ was actually done _before_ this
patch. That is, GHC has been able to reason about kinds with VDQ for
some time, but it lacked the ability to let programmers directly
write these kinds in the source syntax. This patch is primarly about
exposing this ability, by:
* Changing `HsForAllTy` to add an additional field of type
`ForallVisFlag` to distinguish between invisible `forall`s (i.e,
with dots) and visible `forall`s (i.e., with arrows)
* Changing `Parser.y` accordingly
The rest of the patch mostly concerns adding validity checking to
ensure that VDQ is never used in the type of a term (as permitting
this would require full-spectrum dependent types). This is
accomplished by:
* Adding a `vdqAllowed` predicate to `TcValidity`.
* Introducing `splitLHsSigmaTyInvis`, a variant of `splitLHsSigmaTy`
that only splits invisible `forall`s. This function is used in
certain places (e.g., in instance declarations) to ensure that GHC
doesn't try to split visible `forall`s (e.g., if it tried splitting
`instance forall a -> Show (Blah a)`, then GHC would mistakenly
allow that declaration!)
This also updates Template Haskell by introducing a new `ForallVisT`
constructor to `Type`.
Fixes #16326. Also fixes #15658 by documenting this feature in the
users' guide.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds trace messages that include the processes name and as such
make debugging and following the communication easier.
It also adds a note regarding the fwd*Call proxy-communication logic
between the proxy and the slave.
The proxy will now also poll for 60s to wait for the remote iserv
to come up. (Alternatively you can start the remote process
beforehand; and just have iserv-proxy connect to it)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hie002 is a performance test that used to fail unpredictably:
max_bytes_used Decrease from x86_64-linux-deb9-debug baseline @ HEAD~2:
Expected hie002 (normal) max_bytes_used: 1190923992.0 +/-20%
Lower bound hie002 (normal) max_bytes_used: 952739193
Upper bound hie002 (normal) max_bytes_used: 1429108791
Actual hie002 (normal) max_bytes_used: 726270784
Deviation hie002 (normal) max_bytes_used: -39.0 %
peak_megabytes_allocated Decrease from x86_64-linux-deb9-debug baseline @ HEAD~2:
Expected hie002 (normal) peak_megabytes_allocated: 2538.0 +/-20%
Lower bound hie002 (normal) peak_megabytes_allocated: 2030
Upper bound hie002 (normal) peak_megabytes_allocated: 3046
Actual hie002 (normal) peak_megabytes_allocated: 1587
Deviation hie002 (normal) peak_megabytes_allocated: -37.5 %
*** unexpected stat test failure for hie002(normal)
'max_bytes_used' and 'peak_megabytes_allocated' are too unstable without careful
control of the runtime configuration. We fix this by using a more predictable
metric, 'bytes allocated'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the work stealing queue a load-load-barrier is required to ensure
that a read of queue data cannot be reordered before a read of the
bottom pointer into the queue.
The added load-load-barrier ensures that the ordering of writes enforced
at the end of `pushWSDeque` is also respected in the order of reads in
`stealWSDeque_`. In other words, when reading `q->bottom` we want to make
sure that we see the updates to `q->elements`.
Fixes #13633
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements GHC Proposal #24: .../ghc-proposals/blob/master/proposals/0024-no-kind-vars.rst
Fixes Trac #16334, Trac #16315
With this patch, scoping rules for type and kind variables have been
unified: kind variables no longer receieve special treatment. This
simplifies both the language and the implementation.
User-facing changes
-------------------
* Kind variables are no longer implicitly quantified when an explicit
forall is used:
p :: Proxy (a :: k) -- still accepted
p :: forall k a. Proxy (a :: k) -- still accepted
p :: forall a. Proxy (a :: k) -- no longer accepted
In other words, now we adhere to the "forall-or-nothing" rule more
strictly.
Related function: RnTypes.rnImplicitBndrs
* The -Wimplicit-kind-vars warning has been deprecated.
* Kind variables are no longer implicitly quantified in constructor
declarations:
data T a = T1 (S (a :: k) | forall (b::k). T2 (S b) -- no longer accepted
data T (a :: k) = T1 (S (a :: k) | forall (b::k). T2 (S b) -- still accepted
Related function: RnTypes.extractRdrKindSigVars
* Implicitly quantified kind variables are no longer put in front of
other variables:
f :: Proxy (a :: k) -> Proxy (b :: j)
f :: forall k j (a :: k) (b :: j). Proxy a -> Proxy b -- old order
f :: forall k (a :: k) j (b :: j). Proxy a -> Proxy b -- new order
This is a breaking change for users of TypeApplications. Note that
we still respect the dpendency order: 'k' before 'a', 'j' before 'b'.
See "Ordering of specified variables" in the User's Guide.
Related function: RnTypes.rnImplicitBndrs
* In type synonyms and type family equations, free variables on the RHS
are no longer implicitly quantified unless used in an outermost kind
annotation:
type T = Just (Nothing :: Maybe a) -- no longer accepted
type T = Just Nothing :: Maybe (Maybe a) -- still accepted
The latter form is a workaround due to temporary lack of an explicit
quantification method. Ideally, we would write something along these
lines:
type T @a = Just (Nothing :: Maybe a)
Related function: RnTypes.extractHsTyRdrTyVarsKindVars
* Named wildcards in kinds are fixed (Trac #16334):
x :: (Int :: _t) -- this compiles, infers (_t ~ Type)
Related function: RnTypes.partition_nwcs
Implementation notes
--------------------
* One of the key changes is the removal of FKTV in RnTypes:
- data FreeKiTyVars = FKTV { fktv_kis :: [Located RdrName]
- , fktv_tys :: [Located RdrName] }
+ type FreeKiTyVars = [Located RdrName]
We used to keep track of type and kind variables separately, but
now that they are on equal footing when it comes to scoping, we
can put them in the same list.
* extract_lty and family are no longer parametrized by TypeOrKind,
as we now do not distinguish kind variables from type variables.
* PatSynExPE and the related Note [Pattern synonym existentials do not scope]
have been removed (Trac #16315). With no implicit kind quantification,
we can no longer trigger the error.
* reportFloatingKvs and the related Note [Free-floating kind vars]
have been removed. With no implicit kind quantification,
we can no longer trigger the error.
|
|
|
|
| |
14586f5d removed this by accident.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use "touch -r" to set modification timestamps, which leads to precision loss
on Darwin. For example,
before: 2019-02-25 01:11:23.807627350 +0300
after: 2019-02-25 01:11:23.807627000 +0300
^^^
This means we can't trick GHCi into thinking the file hasn't been changed by
restoring its old timestamp, as we cannot faithfully restore all digits.
The solution is to nullify the insignificant digits before the first :load
|
|
|
|
| |
See Trac #15072, Trac #16349, Trac #16350
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #14037.
Metric Decrease:
T9872b
T9872d
Reviewers: bgamari, simonpj, hvr
Reviewed By: simonpj
Subscribers: AndreasK, simonpj, osa1, dfeuer, rwbarton, carter
GHC Trac Issues: #14037
Differential Revision: https://phabricator.haskell.org/D5249
|