| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This is needed because GHC 7.10.2 requires a minor version bump to base-4.8.1.0
Several test outputs needed base-4.8.1.0 replaced by base-4.8.2.0
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a minor refactoring, but it simplifies the code quite a bit
* Decrease the number of variants of tcExtend in TcEnv
* Remove "not_actually_free" from TcEnv.tc_extend_local_env2
* Simplify plumbingof the "closed" flag
* Remove redundant scoping of wild-card variables
|
|
|
|
|
| |
We've accumulated enough to justify a minor version bump to 4.8.1.0,
but not enough to justify a major version bump yet as far as I can see.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This major version bump was made necessary by
f44333eae7bc7dc7b6003b75874a02445f6b633b which changed the type
signatures of prefetch primops, as well as other changes
such as 051d694fc978ad28ac3043d296cafddd3c2a7050 turning `Any` into
an abstract closed type family.
Reviewed By: ekmett
Differential Revision: https://phabricator.haskell.org/D743
|
|
|
|
|
|
|
|
|
| |
* The original fix was to improve the documentation, in
line with the suggestions on Trac #10122
* But in doing so I realised that the kind generalisation in
TcRnDriver.tcRnType was completely wrong. So I fixed that
and updated Note [Kind-generalise in tcRnType] to explain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
SPJ's solution is to only bring the `TcId` (which includes the type) of a
binder into scope when it had a non-partial type signature.
Take care of this by only storing the `TcId` in `TcSigInfo` of non-partial
type signatures, hence the change to `sig_poly_id :: Maybe TcId`. Only in case
of a `Just` will we bring the `TcId` in scope. We still need to know the name
of the binder, even when it has a partial type signature, so add a `sig_name
:: Name` field. The field `sig_partial :: Bool` is no longer necessary, so
reimplement `isPartialSig` in terms of `sig_poly_id`.
Note that the new test case fails, but not because of a panic, but because the
`Num a` constraint is missing. Adding an extra-constraints wildcard to
`copy`'s signature would fix it.
Test Plan: validate
Reviewers: simonpj, austin
Reviewed By: simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D646
GHC Trac Issues: #10045
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Disallow wildcards in stand-alone deriving instances
(StandaloneDeriving), default signatures (DefaultSignatures) and
instances signatures (InstanceSigs).
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie, monoidal
Differential Revision: https://phabricator.haskell.org/D595
GHC Trac Issues: #9922
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Type brackets containing a wildcard, e.g. `[t| _ |]`, caused a panic.
Fix it by disallowing wildcards in type brackets.
Together with D572, this fixes #9879.
Test Plan: new test WildcardInTypeBrackets should pass
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie, monoidal
Differential Revision: https://phabricator.haskell.org/D573
GHC Trac Issues: #9879
|
|
Summary:
Add support for Partial Type Signatures, i.e. holes in types, see:
https://ghc.haskell.org/trac/ghc/wiki/PartialTypeSignatures
This requires an update to the Haddock submodule.
Test Plan: validate
Reviewers: austin, goldfire, simonpj
Reviewed By: simonpj
Subscribers: thomie, Iceland_jack, dominique.devriese, simonmar, carter, goldfire
Differential Revision: https://phabricator.haskell.org/D168
GHC Trac Issues: #9478
|