| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
We have to instantiate any invisible arguments to type families
right away. This is now done in tcTyCon in TcHsType.
testcase: typecheck/should_compile/T11246
|
|
|
|
|
|
|
| |
When renaming a type, now looks for wildcards in bound variables'
kinds.
testcase: dependent/should_compile/T11241
|
| |
|
| |
|
|
|
|
| |
This addresses point (2) from #11513.
|
| |
|
|
|
|
| |
Related to the fix to Trac #9611
|
|
|
|
|
| |
I discussed it with Richard, but this version is much
simmpler and more efficient.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We just return an arbitrary value since we are destined to fail due to
the error anyways.
Fixes #11580.
Test Plan: Needs to be tested
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1925
GHC Trac Issues: #11580
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See Trac #9611. In "No instance..." error message we suggest instances
for other types with the same occ name. It is usefull e.g. when we have
two different versions of the same package installed.
Test Plan: typecheck/should_fail/tcfail224
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1919
GHC Trac Issues: #9611
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1915
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace `NoDataKinds :: PromotionErr` by `NoDataKindsTC` and
`NoDataKindsDC` (just like there is `NoTypeInTypeTC` and
`NoTypeInTypeDC`). This allows for a correct error message when a kind
signature contains a type constructor and `-XDataKinds` is not
specified.
Apply a small fix to `TcError.hs` where instead of "data constructor" we
should say "pattern synonym".
Reviewers: austin, goldfire, bgamari
Reviewed By: bgamari
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D1909
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is ambiguty between (1) type constructors and (2) data
constructors in export lists, e.g. '%%' can stand for both of them. This
ambiguity is resolved in favor of (2).
If the exported data constructor is not in scope, but type constructor
with the same name is in scope, GHC should suggest adding 'type' keyword
to resolve ambiguity in favor of (1) and enabling 'TypeOperators'
extension.
The patch only extends the error message.
See Trac #11432.
Test Plan: `make test`
Reviewers: simonpj, bgamari, austin
Reviewed By: simonpj
Subscribers: mpickering, thomie, goldfire, kosmikus
Differential Revision: https://phabricator.haskell.org/D1902
GHC Trac Issues: #11432
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug was revealed by Trac #11362. It turns out that in my patch
for Trac #11148 (namely 1160dc5), I failed to turn one occurrence of
tvs' into full_tvs. Sigh. This is tricky stuff and it cost me
several hours to page it back in and figure out what was happening.
The result was a CoAxiom whose lhs had rhs had different kinds. Eeek!
Anyway it's fixed.
I also added an ASSERT, in FamInst.newFamInst, that trips on such
bogus CoAxioms.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
TcErrors has a system for suppressing some type errors if a more
serious one occurs. But there was a crucial missing case, which
sometimes resulted in a cascade of irrelevant errors overwhelming
the actual cause. This was Trac #11541.
The fix is simple. Worth merging to 8.0
|
|
|
|
|
|
|
| |
When renaming a HsVar it can be converted to a HsRecField. In the
process the location of the enclosed name is converted to a noLoc
Closes #11576
|
|
|
|
| |
No change in behaviour
|
|
|
|
|
|
|
|
| |
Reduces un-neede parens.
Also -fprint-typechecker-elaboration now makes type applications
and casts in expressions also appear. (Previously those were
confusingly controlled by -fprint-explicit-coercions.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In poking Trac #11414 I found myself sinking into the abe_inst_wrap
swamp. What is this strange thing? (It turned out that #11414 was
breaking because of it.)
Thrillingly, I found a way to sweep it away again, putting the deep
instantation into tcMonoBinds instead of mkExport; and it turned out
that the fun_co_fn field of FunBind was already there ready to receive
exactly this wrapper. Hooray. Result
* Death to abe_inst_wrap
* Death to mbi_orig
* Death to the plumbing in tcPolyInfer that did the
deep instantiation
I did find that I had to re-engineer the treatment of instance type
signatures (again), but the result looks more modular and robust to
me.
And #11414 is fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit dbf72dbc6e49b3db7f2337a7a41e95c1d0169163.
This commit introduced performance regressions:
https://ghc.haskell.org/trac/ghc/ticket/11371#comment:27,
I will push it again after I fix it.
Test Plan: revert
Reviewers: simonpj, bgamari, simonmar, austin, goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D1907
|
|
|
|
| |
This reverts commit 51a33924fc118d9b6c1db556c75c0d010ef95e18.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug where piResultTy created
substitutions that would violate both of the invariants
in Note [The substitution invariant].
Test Plan: ./validate --slow
Reviewers: goldfire, simonpj, austin, bgamari
Reviewed By: simonpj, bgamari
Subscribers: simonmar, thomie
Differential Revision: https://phabricator.haskell.org/D1855
GHC Trac Issues: #11371
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, all flags were present in user suggest and completion. This commit
removes the deprecated ones from there. It is done by saving deprecation info
at the moment of flag definition.
Reviewers: rwbarton, austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D1883
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were two bugs here:
* We weren't ignoring Cast in size_up_app
* An application of a non-variable wasn't being charged correct
The result was that some things looked too cheap. In my case I had
things like
((f x) `cast` ...) y
which was given size 21 instead of 30, and this had knock-on effects
elsewhere that caused some large code bloat.
Test Plan:
* nofib runs (todo)
* validate
Reviewers: simonpj, austin, bgamari, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1900
GHC Trac Issues: #11564
|
|
|
|
| |
...following a question from Conal
|
|
|
|
|
|
|
| |
See Note [Eta-reduction in -O0] in DynFlags.
Bottom line: doing eta reduction unconditionally is benign, and
removes an ASSERT failure (Trac #11562).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's just a small cleanup. There should be no change in
behaviour.
Test Plan: ./validate --slow
Reviewers: austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: thomie, simonmar
Differential Revision: https://phabricator.haskell.org/D1901
|
|
|
|
|
|
|
|
|
| |
This simple change fixes Trac #11563, #11520, #11516, #11399.
See esp the comments in #11520.
See Note [Fail fast on kind errors] in TcSimplify
Merge to 8.0 branch
|
|
|
|
|
|
|
| |
GHC does not use passed paramaters anywhere
for this deprecated option.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously "types" was inappropriately made plural instead of
"instance",
instance Eq Ordering -- Defined in ‘GHC.Classes’
...plus 24 others
...plus 13 instance involving out-of-scope typess
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The module CmmLayoutStack removes stack checks if a function does not
use stack space. However, it can only recognize checks of the form
Sp < SpLim. However, these checks get sometimes rewritten to
Sp >= SpLim (with both branches swapped), so we better recognize these
checks too.
Test Plan: ./validate
Reviewers: austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1881
GHC Trac Issues: #11533
|
|
|
|
|
|
|
|
| |
Reviewers: austin, thomie
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1893
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We also need to update `stgBindHasCafRefs` assertion with this change,
as we no longer have the pre-computed SRT, LiveVars etc. We rename it to
`topStgBindHasCafRefs` and implement it like this:
A non-updatable top-level binding may refer to a CAF by referring to a
top-level definition with CAFs. A top-level definition may have CAFs if
it's updatable. At this point (because this is done after TidyPgm)
top-level Ids (whether imported or defined in this module) are
GlobalIds, so the top-levelness test is easy. (see also comments in the
code)
Reviewers: bgamari, simonpj, austin
Reviewed By: simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1889
GHC Trac Issues: #11550
|
|
|
|
|
|
|
|
|
|
|
| |
tyConRolesRepresentational is just a version of tyConRolesX, but
specialised for a Representational argument. Saves a bit of extra
argument passing and pattern matching, and tyConRolesX was often
called when we knew the argument role was Representational.
Rather to my surprise this made the compiler allocate 5% less
for tests T9872{b,c,d}. At least I think it's this commit.
Good thing, regardless.
|
|
|
|
|
| |
mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst
produces a TCvSubst with an empty CvSubstEnv
|
|
|
|
|
|
|
|
| |
..around newtype deriving instances.
See esp the new Note [Newtype-deriving instances]
No change in behaviour
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes Trac #11523.
* The basic problem was that TcRnTypes.superClassesMightHelp was
returning True of a Derived constraint, and that led to us
expanding Given superclasses, which produced the same Derived
constraint again, and so on infinitely. We really want to do
this only if there are unsolve /Wanted/ contraints!
* On the way I made TcSMonad.getUnsolvedInerts a bit more
discriminating about which Derived equalities it returns;
see Note [Unsolved Derived equalities] in TcSMonad
* Lots of new comments in TcSMonad.
|
| |
|
|
|
|
| |
This is a small refactoring, no change in behaviour.
|
|
|
|
|
|
|
|
| |
If we fail to typecheck by blowing the constraint simplifier
iteration limit, we want to see the limit-blowing meessage.
Previously it was being suppressed by the type /error/, which
suppress the iteration-limit /warning/. Solution: make the
iteration-limit message into an error.
|
| |
|
|
|
|
|
| |
They were excessively verbose. I've commented them out rather than
deleting so that they can easily be restored.
|
|
|
|
|
|
|
|
| |
When investigating Trac #11523 I found that superclass
expansion was a little over-aggressive; we were sort of
unrolling each loop twice.
This patch corrects that, and adds explanatory comments.
|