summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs
Commit message (Collapse)AuthorAgeFilesLines
* Bump base version to 4.8.2.0Herbert Valerio Riedel2015-04-2544-44/+44
| | | | | | 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
* Error msg wibbles from reduced module prefixesSimon Peyton Jones2015-04-071-25/+22
|
* Improve environment handling in TcBindsSimon Peyton Jones2015-03-243-3/+3
| | | | | | | | | 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
* Minor bump `base` version to 4.8.1.0Herbert Valerio Riedel2015-03-2344-44/+44
| | | | | 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.
* Bump ghc-prim to 0.4.0.0Herbert Valerio Riedel2015-03-2041-43/+43
| | | | | | | | | | | | 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
* Two kind-polymorphism fixes (Trac #10122)Simon Peyton Jones2015-03-021-1/+1
| | | | | | | | | * 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.
* Fix #10045Thomas Winant2015-02-183-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix panics of PartialTypeSignatures combined with extensionsThomas Winant2015-01-137-0/+27
| | | | | | | | | | | | | | | | | | | 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
* Major patch to add -fwarn-redundant-constraintsSimon Peyton Jones2015-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Print singleton consraints without parensSimon Peyton Jones2015-01-064-6/+5
| | | | | | | | | | 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
* Modify a couple of error messages slightlySimon Peyton Jones2015-01-062-28/+28
| | | | | | | | | | | | 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.
* Rename NamedWildcards flag to NamedWildCardsThomas Winant2014-12-2322-22/+22
| | | | | | | | | | | | | | | | 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
* Fix panic on :kind _ in GHCi (Trac #9879)Thomas Winant2014-12-234-0/+9
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix panic on [t| _ |] (Trac #9879)Thomas Winant2014-12-153-0/+9
| | | | | | | | | | | | | | | | | | | | 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
* Implement Partial Type SignaturesThomas Winant2014-11-28175-0/+2105
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