| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea was promted by Trac #9939, but it was Christmas, so I did
some recreational programming that went much further.
The idea is to warn when a constraint in a user-supplied context is
redundant. Everything is described in detail in
Note [Tracking redundant constraints]
in TcSimplify.
Main changes:
* The new ic_status field in an implication, of type ImplicStatus.
It replaces ic_insol, and includes information about redundant
constraints.
* New function TcSimplify.setImplicationStatus sets the ic_status.
* TcSigInfo has sig_report_redundant field to say whenther a
redundant constraint should be reported; and similarly
the FunSigCtxt constructor of UserTypeCtxt
* EvBinds has a field eb_is_given, to record whether it is a given
or wanted binding. Some consequential chagnes to creating an evidence
binding (so that we record whether it is given or wanted).
* AbsBinds field abs_ev_binds is now a *list* of TcEvBiinds;
see Note [Typechecking plan for instance declarations] in
TcInstDcls
* Some significant changes to the type checking of instance
declarations; Note [Typechecking plan for instance declarations]
in TcInstDcls.
* I found that TcErrors.relevantBindings was failing to zonk the
origin of the constraint it was looking at, and hence failing to
find some relevant bindings. Easy to fix, and orthogonal to
everything else, but hard to disentangle.
Some minor refactorig:
* TcMType.newSimpleWanteds moves to Inst, renamed as newWanteds
* TcClassDcl and TcInstDcls now have their own code for typechecking
a method body, rather than sharing a single function. The shared
function (ws TcClassDcl.tcInstanceMethodBody) didn't have much code
and the differences were growing confusing.
* Add new function TcRnMonad.pushLevelAndCaptureConstraints, and
use it
* Add new function Bag.catBagMaybes, and use it in TcSimplify
|
|
|
|
|
|
|
|
|
|
| |
The main change is in TypeRep.pprTheta, so we print
Eq a
for a singleton, but
(Eq a, Show a)
for multiple constraints.
There are lots of trivial knock-on changes to error messages
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular
In the type signature for:
f :: Int -> Int
I added the colon
Also reword the "maybe you haven't applied a function to enough arguments?"
suggestion to make grammatical sense.
These tiny changes affect a lot of error messages.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously it was a SrcSpan, which can be an UnhelpulSrcSpan,
but actually for TcLclEnv and CtLoc we always know it is
a real source location, and it's good to make the types
reflect that fact.
There is a continuing slight awkwardness (not new with this
patch) about what "file name" to use for GHCi code. Current
we say "<interactive>" which seems just about OK.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Where we track timestamps of object files, also track timestamps
for interface files. When -fno-code -fwrite-interface is enabled, use
the interface file timestamp as an extra check to see if the files are
up-to-date. We had to apply this logic to one-shot and make modes.
This fix would be good to merge into 7.10; it makes using -fno-code
-fwrite-interface for flywheel type checking usable.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate and new test cases
Reviewers: austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D596
GHC Trac Issues: #9243
|
|
|
|
|
| |
either one of the two recent commits (d8d0031, fd97d2a) fixed it, or
there is some nondeterminism here. See #9938.
|
|
|
|
|
|
|
|
|
| |
By passing -O2, the bug appears depending on the order of clauses in
"solve", hence adding T9938B as the other variant.
Currently, T9938 is marked as broken, but maybe the bug is actually in
T9938B, where something (possibly inlining, as suggested by rwbarton)
affected the requirement to link against transformers.
|
|
|
|
| |
Marked as known_broken
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, erikd
Reviewed By: erikd
Subscribers: erikd, carter, thomie
Differential Revision: https://phabricator.haskell.org/D588
|
|
|
|
|
|
| |
This involves recognizing lines starting with `"pattern "` as declarations,
keeping non-exported pattern synonyms in `deSugar`, and including
pattern synonyms in the result of `hscDeclsWithLocation`.
|
| |
|
|
|
|
|
|
| |
First attempt via 7a2c9dde24b72f wasn't working properly. This attempt
should work better as it doesn't cause the makefile recipe to fail which
causes `make` to emit additional varying output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I'm not really happy about perpetuating the hackish fix for #8696,
but at least in the context of building with -fhpc, the performance
cost should be negligible.
I'm suspicious about PlainModuleInitLabel and the Windows stuff too,
but I don't know what it does / can't test it (respectively) so I'll
leave those alone for now.
Hopefully out-of-process TH will save us from these hacks some day.
The test is an adaptation of T8696. It's a bit more awkward since
I couldn't think of a way to get cross-module tickbox references
without optimizations (inlining), but ghci doesn't permit -O for
some reason.
Test Plan: harbormaster; validate
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D583
GHC Trac Issues: #9762
Conflicts:
testsuite/tests/ghci/scripts/all.T
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Note: This commit includes an API change to GhciMonad.runDecls
to allow the caller to determine whether the declarations were
run successfully or not.
Test Plan: harbormaster
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D582
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Some Trues and Falses were mixed up due to Bool being used in
different senses in different parts of GHCi.
Test Plan: harbormaster; validate
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D581
GHC Trac Issues: #9905
Conflicts:
ghc/InteractiveUI.hs
|
|
|
|
|
| |
This is not a proper fix as the `x` in `make[x]: ...` changes depending on how
the testsuite was called. So this probably only works when invoked via ./validate.
|
|
|
|
|
|
|
|
|
| |
This patch makes the renamer check for self-import, especially when
dependencies change, because the typechecker can fall over if that
happens.
I'm still uneasy about *indirect* self-import, but I'll leave that for
another day
|
|
|
|
|
|
|
| |
I found several tests that failed when the interface file format changed,
due to leftover .hi file droppings.
I'm not sure I've done this right, but it should be a bit better
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The purpose of silent superclass parameters was to solve the
awkward problem of superclass dictinaries being bound to bottom.
See THE PROBLEM in Note [Recursive superclasses] in TcInstDcls
Although the silent-superclass idea worked,
* It had non-local consequences, and had effects even in Haddock,
where we had to discard silent parameters before displaying
instance declarations
* It had unexpected peformance costs, shown up by Trac #3064 and its
test case. In monad-transformer code, when constructing a Monad
dictionary you had to pass an Applicative dictionary; and to
construct that you neede a Functor dictionary. Yet these extra
dictionaries were often never used. (All this got much worse when
we added Applicative as a superclass of Monad.) Test T3064
compiled *far* faster after silent superclasses were eliminated.
* It introduced new bugs. For example SilentParametersOverlapping,
T5051, and T7862, all failed to compile because of instance overlap
directly because of the silent-superclass trick.
So this patch takes a new approach, which I worked out with Dimitrios
in the closing hours before Christmas. It is described in detail
in THE PROBLEM in Note [Recursive superclasses] in TcInstDcls.
Seems to work great!
Quite a bit of knock-on effect
* The main implementation work is in tcSuperClasses in TcInstDcls
Everything else is fall-out
* IdInfo.DFunId no longer needs its n-silent argument
* Ditto IDFunId in IfaceSyn
* Hence interface file format changes
* Now that DFunIds do not have silent superclass parameters, printing
out instance declarations is simpler. There is tiny knock-on effect
in Haddock, so that submodule is updated
* I realised that when computing the "size of a dictionary type"
in TcValidity.sizePred, we should be rather conservative about
type functions, which can arbitrarily increase the size of a type.
Hence the new datatype TypeSize, which has a TSBig constructor for
"arbitrarily big".
* instDFunType moves from TcSMonad to Inst
* Interestingly, CmmNode and CmmExpr both now need a non-silent
(Ord r) in a couple of instance declarations. These were previously
silent but must now be explicit.
* Quite a bit of wibbling in error messages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Mind the capital C. As there is already a flag RecordWildCards with a capital
C, we should at least try to be consistent in the spelling of WildCards.
Test Plan: validate
Reviewers: goldfire, simonpj, austin
Reviewed By: simonpj, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D584
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Running `:kind _` in GHCi produced a panic, fix it by extracting the
wildcards. Now, `:kind _` produces `_ :: k0`. Unfortunately, a `0` is
added after the kind is tidied and I haven't found a way to get rid of
it...
This does not fix the other panic involving TemplateHaskell mentioned
in #9879.
Test Plan: new test GHCiWildcardKind should pass
Reviewers: austin, simonpj
Reviewed By: austin
Subscribers: simonpj, carter, thomie, monoidal
Differential Revision: https://phabricator.haskell.org/D572
GHC Trac Issues: #9879
|
|
|
|
|
|
| |
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D574
|
|
|
|
|
|
| |
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D575
|
|
|
|
|
| |
This fixes Trac #9881, and gives more helpful output in the case of ambiguity.
Certainly more helpful than the positively-misleading error we get right now.
|
| |
|
|
|
|
|
| |
This updates those two packages to their most recent respective proper
releases.
|
|
|
|
| |
declaration (fixes #9914)
|
| |
|
|
|
|
| |
look like prefixes of valid declarations (fixes #9915)
|
| |
|
|
|
|
|
| |
This has a demonstrated 2x speed boost on the T9872{a,b,c} tests.
(#9872)
|
| |
|
| |
|
| |
|
|
|
|
| |
See comments in #8984. This takes back the fix for #6088.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These two facilities provide some means to avoid the double-breakage caused by
first by the deprecation (see #2496), and then again by the actual future
field-removal.
See also
https://groups.google.com/d/msg/haskell-core-libraries/q9H-QlL_gnE/4lbb_mBjre8J
for details about this library addition.
Reviewed By: ekmett
Differential Revision: https://phabricator.haskell.org/D577
|
| |
|
|
|
|
| |
this just pulls in the version bump to 0.10.6
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes some performance regressions introduced by 0cc47eb,
adding more `Coercible` magic to the solver. See Note
[flatten_many performance] in TcFlatten for more info.
The improvements do not quite restore the old numbers. Given that
the solver is really more involved now, I am accepting this regression.
The way forward (I believe) would be to have *two* flatteners: one
that deals only with nominal equalities and thus never checks roles,
and the more general one. A nice design of keeping this performant
without duplicating code eludes me, but someone else is welcome
to take a stab.
|
| |
|
|
|
|
|
|
| |
Fixes Trac #9892.
Must form part of 7.10.1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See Note [Disgusting computation of CafRefs] in TidyPgm.
Also affects CoreUtils.rhsIsStatic.
The real solution here is to compute CAF and arity information
from the STG-program, and feed it back to tidied program for
the interface file and later GHCi clients. A battle for another
day.
But at least this commit reduces the number of gratuitous CAFs, and
hence SRT entries. And kills off a batch of ASSERT failures.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we were capturing the *entire environment* when moving under
a 'proc', for the newArrowScope/escapeArrowScope thing. But that a blunderbuss,
and in any case isn't right (the untouchable-type-varaible invariant gets
invalidated).
So I fixed it to be much more refined: just the LocalRdrEnv and constraints are
captured.
I think this is right; but if not we should just add more fields to ArrowCtxt,
not return to the blunderbuss.
This patch fixes the ASSERT failure in Trac #5267
|
| |
|
| |
|