| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate on lots of platforms
Reviewers: erikd, simonmar, austin
Reviewed By: erikd, simonmar
Subscribers: michalt, thomie
Differential Revision: https://phabricator.haskell.org/D2699
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: simonmar, austin, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2764
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The use of globals is quite painful when multiple rts are loaded, e.g.
when plugins are loaded, which bring in a second rts. The sharedCAF
appraoch was employed for the FastStringTable; I've taken the libery
to extend this to the other globals I could find.
Reviewers: rwbarton, simonmar, austin, hvr, erikd, bgamari
Reviewed By: simonmar, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2575
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider the case of building a stage1 compiler. `hschooks.c` will be
built by stage0 `ghc` and linked against the `stage0` RTS. Despite this
it was #including the stage1 `Rts.h`. There is, of course, no guarantee
that this is ABI-compatible with the stage0 RTS and when they diverge
Bad Things happen (e.g. bells ringing at inappropriate times in D2699).
Test Plan: Validate
Reviewers: simonmar, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2763
|
|
|
|
| |
Unfortunately it's quite unclear what caused this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: austin, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2740
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: austin, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2737
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: austin, simonmar, michalt
Reviewed By: simonmar, michalt
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2736
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems like a clearer name and the fewer functions that
one needs to remember, the better.
Test Plan: validate
Reviewers: austin, simonmar, michalt
Reviewed By: simonmar, michalt
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2735
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: GHC CI
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: snowleopard, thomie
Maniphest Tasks: T74
Differential Revision: https://phabricator.haskell.org/D2732
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, austin
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2725
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch reverts the change introduced with
587dcccfdfa7a319e27300a4f3885071060b1f8e and restores the previous
default output of GHC (i.e., show source path and object path for each
compiled module).
The -fhide-source-paths flag can be used to hide these paths and reduce
the line
noise.
Reviewers: gracjan, nomeata, austin, bgamari, simonmar, hvr
Reviewed By: hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2728
GHC Trac Issues: #12851
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Read it
Reviewers: austin
Subscribers: mpickering, thomie
Differential Revision: https://phabricator.haskell.org/D2747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the two functions strict in the accumulator - it seems that
there are only two users of those functions: `CmmLive` and `CmmSink`
and in both cases the strict fold fits better.
The commit also removes a few unused functions (`filterRegsUsed`),
instances (for `Maybe` and `RegSet`) and gets rid of unnecessary
inculde of `HsVersions.h`.
The performance effect of avoiding unnecessary thunks is mostly
negligible, although we do allocate a tiny bit less (nofib's section
on compile allocations):
```
-1 s.d. ----- -0.2%
+1 s.d. ----- -0.1%
Average ----- -0.2%
```
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: validate
Reviewers: simonmar, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2723
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: erikd, Phyx, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2717
GHC Trac Issues: #8809
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a preliminary commit to add colors to diagnostics (warning and
error messages). The aesthetic changes are:
- 'warning', 'error', and 'fatal' are all colored magenta, red, and
red respectively.
- The warning annotation [-Wsomething] shares the same color.
- Warnings and errors are also bolded (this is consistent with what
other compilers do).
A new flag has been added to control the behavior:
-fdiagnostics-color=(always|auto|never)
This flag is 'auto' by default. However, auto-detection is not
implemented yet, so it effectively it defaults to off.
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2716
GHC Trac Issues: #8809
|
|
|
|
|
| |
I've been editing the release notes on the `ghc-8.0` branch; fold those
changes into `master`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On iOS, we use the pthread-based implementation of Itimer.c even for a
non-threaded RTS. Since 999c464, this relies on synchronization
primitives like Mutex, so ensure those primitives are defined whenever
they are supported, even if !THREADED_RTS.
Fixes #12799.
Reviewers: erikd, austin, simonmar, bgamari
Reviewed By: simonmar, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2712
GHC Trac Issues: #12799
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we were making them into skolem TcTyVars,
which is wrong for the output of the type checker, which
no TcTyVars should surive.
See Note [Zonking the LHS of a RULE] in TcHsSyn
This was flushed out by the new IfaceTcTyVar thing;
I found some more TcTyVars that were being serialised into
an interface file, which is wrong wrong wrong.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Resolves #12881.
Test Plan: Read it, commit it, merge it, ship it
Reviewers: hvr, simonpj, austin, bgamari
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D2760
GHC Trac Issues: #12881
|
|
|
|
|
|
| |
It took me some time to find the right Note for the
fix to #12789. This comment patch tries to add pointers
from relevant places.
|
|
|
|
|
|
|
|
|
|
| |
...which is fixed by
commit 0476a64e70c91b326b53db2fc55adbbaa8e5c270
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date: Tue Oct 25 15:22:17 2016 +0100
Fix a bug in mk_superclasses_of
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug was beautifully characterised in Trac #12776,
which showed a small program for which the inliner went
into an infinite loop. Eeek.
It turned out to be a genuine and long-standing bug in
the occurrence analyer, specifically in the bit that
identifies loop breakers. In this line
pairs | isEmptyVarSet weak_fvs
= reOrderNodes 0 bndr_set weak_fvs tagged_nodes []
| otherwise
= loopBreakNodes 0 bndr_set weak_fvs loop_breaker_edges []
the 'tagged_nodes' should be 'loop_breaker_edges'.
That's it!
The diff looks a lot bigger because I did some work on
comments and variable naming, but that's all it is. We
were using the wrong set of dependencies!
I'm astonished that this bug has not caused more trouble.
It dates back to at least 2011 and maybe further.
|
|
|
|
|
|
|
|
|
| |
This patch makes [W] constraints not participate in
improvement. See Note [Do not do improvement for WOnly]
in TcSMonad.
Removes some senseless work duplication in some cases (notably
Trac #12860); should not change behaviour.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When we had
f :: ( _ ) => blah
we were failing to call growThetaTyVars, as we do in the
no-type-signature case, and that meant that we weren't generalising
over the right type variables. I'm quite surprised this didn't cause
problems earlier.
Anyway Trac #12844 showed it up and this patch fixes it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename CoAxiom.Eqn = Pair Type to TypeEqn,
and use it for fundeps
* Use the FunDepEqn for injectivity, which lets us share a bit
more code, and (more important) brain cells
* When generating fundeps, take the max depth of the two
constraints. This aimed at tackling the strange loop in
Trac #12860, but there is more to come for that.
* Improve pretty-printing with -ddump-tc-trace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this commit
commit 6c0f10fac767c49b65ed71e8eb8e78ca4f9062d5
Author: Ben Gamari <bgamari.foss@gmail.com>
Date: Sun Nov 13 16:17:37 2016 -0500
Kill Type pretty-printer
we switched to pretty-printing a type by converting it to an
IfaceType and pretty printing that. Very good.
This patch fixes two things
* The new story is terrible for debug-printing with -ddump-tc-trace,
because all the extra info in an open type was discarded ty the
conversion to IfaceType.
This patch adds IfaceTcTyVar to IfaceType, to carry a TcTyVar in
debug situations. Quite an easy change, happily. These things
never show up in interface files.
* Now that we are going via IfaceType, it's essential to tidy before
converting; otherwise
forall k_23 k_34. blah
is printed as
forall k k. blah
which is very unhelpful. Again this only shows up in debug
printing.
|
|
|
|
|
|
|
|
|
| |
I found that some TcTyVars were lurking in a PatSyn, because
tc_patsyn_finish was using the TcType -> TcType zonker rather
than the TcType -> Type zonker. Eeek.
I fixing this I also tided up function naming a bit (still not
terrific), and removed the unused TcTyBinder type entirely.
|
|
|
|
|
|
|
|
|
| |
En route to something else I discovered that TcInstDcls.addDFunPrags
was building a DFunUnfolding that had TcTyVars in it. They should
never survive beyond type checking. It was harmeless, but now affects
type pretty-printing.
This patch fixes it.
|
|
|
|
|
| |
Just affects Id.mkTemplateLocal, and should make debug prints
a little less voluminous. No user-visible change here.
|
|
|
|
|
|
|
|
|
|
| |
IfaceTypes are really not well suited to finding free variables etc.
Nevertheless, there was quite a lot of code to do just that; but it
was only used to see if a kind is variable-free so as to decide
whether to print a forall binder.
This patch simplifies to deal with just that case, replacing all
the free-vars stuff with just ifTypeIsVarFree
|
| |
|
| |
|
|
|
|
|
| |
Trac #12686 showed that we were allowing a term variable into
a type, by promotion. I chose to squash this in the renamer.
|
| |
|
|
|
|
|
| |
I think this wave of commits just made these two a little better;
they must have been close to the threshold before.
|
|
|
|
|
| |
The invariants for CTyEqCan mean that this check isn't needed.
Turn it into an ASSERT.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up to now we've had a rule that a TyVar can't apppear in a type
seen by the type checker; they should all be TcTyVars. But:
a) With -XTypeInType it becomes much harder to exclude them;
see Note [TcTyVars in the typechecker] in TcType.
b) It's unnecessary to exculde them; instead we can just treat
a TyVar just like vanillaSkolemTv.
This is what was causing an ASSERT error in
indexed-types/should_fail/T12041, reported in Trac #12826.
That patch allows a TyVar in a TcType. The most significant
change is to make Var.tcTyVarDetails return vanillaSkolemTv.
In fact it already did, but (a) it was not documented, and
(b) we never exploited it. Now we rely on it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch takes further my refactoring of the constraint
solver, which I've been doing over the last couple of months
in consultation with Richard.
It fixes a number of tricky bugs that made the constraint
solver actually go into a loop, including
Trac #12526
Trac #12444
Trac #12538
The main changes are these
* Flatten unification variables (fmvs/fuvs) appear on the LHS
of a tvar/tyvar equality; thus
fmv ~ alpha
and not
alpha ~ fmv
See Note [Put flatten unification variables on the left]
in TcUnify. This is implemented by TcUnify.swapOverTyVars.
* Don't reduce a "loopy" CFunEqCan where the fsk appears on
the LHS:
F t1 .. tn ~ fsk
where 'fsk' is free in t1..tn.
See Note [FunEq occurs-check principle] in TcInteract
This neatly stops some infinite loops that people reported;
and it allows us to delete some crufty code in reduce_top_fun_eq.
And it appears to be no loss whatsoever.
As well as fixing loops, ContextStack2 and T5837 both terminate
when they didn't before.
* Previously we generated "derived shadow" constraints from
Wanteds, but we could (and sometimes did; Trac #xxxx) repeatedly
generate a derived shadow from the same Wanted.
A big change in this patch is to have two kinds of Wanteds:
[WD] behaves like a pair of a Wanted and a Derived
[W] behaves like a Wanted only
See CtFlavour and ShadowInfo in TcRnTypes, and the ctev_nosh
field of a Wanted.
This turned out to be a lot simpler. A [WD] gets split into a
[W] and a [D] in TcSMonad.maybeEmitShaodow.
See TcSMonad Note [The improvement story and derived shadows]
* Rather than have a separate inert_model in the InertCans, I've
put the derived equalities back into inert_eqs. We weren't
gaining anything from a separate field.
* Previously we had a mode for the constraint solver in which it
would more aggressively solve Derived constraints; it was used
for simplifying the context of a 'deriving' clause, or a 'default'
delcaration, for example.
But the complexity wasn't worth it; now I just make proper Wanted
constraints. See TcMType.cloneWC
* Don't generate injectivity improvement for Givens; see
Note [No FunEq improvement for Givens] in TcInteract
* solveSimpleWanteds leaves the insolubles in-place rather than
returning them. Simpler.
I also did lots of work on comments, including fixing Trac #12821.
|
|
|
|
| |
I need this in a later patch
|
| |
|
|
|
|
|
|
|
| |
This bug meant that we were less eager about expanding
tuple superclasses than we should have been; i.e. we stopped
too soon. That's not fatal, beause we expand more superclasses
later, but it's less efficient.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously TH was incorrectly returning a `Dec` using a `ConT` instead
of `PromotedT`.
Test Plan: validate
Reviewers: mainland, jstolarek, osa1, goldfire, thomie, bollmann,
bgamari, RyanGlScott, austin
Reviewed By: RyanGlScott
Subscribers: erikd
Differential Revision: https://phabricator.haskell.org/D2188
GHC Trac Issues: #11629
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch also removes the "catch all" pattern in the function and
explicitly lists constructors to get a warning in the future if a new
`HsType` was added.
Reviewers: bgamari, austin, simonpj
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D2753
GHC Trac Issues: #12711
|