summaryrefslogtreecommitdiff
path: root/testsuite/tests/backpack
Commit message (Collapse)AuthorAgeFilesLines
* Bump ghc-prim to 0.5.2.0 and update changelogHerbert Valerio Riedel2017-10-171-1/+1
| | | | | | | This is prompted by the addition of `compareByteArrays#` in e3ba26f8b49700b41ff4672f3f7f6a4e453acdcc NOTE: We may switch to synchronise `ghc-prim` with GHC's version at some point
* Levity polymorphic Backpack.Edward Z. Yang2017-10-163-0/+46
| | | | | | | | | | | | | | | | | | | | | This patch makes it possible to specify non * kinds of abstract data types in signatures, so you can have levity polymorphism through Backpack, without the runtime representation constraint! Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: andrewthad, bgamari, austin, goldfire Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie GHC Trac Issues: #13955 Differential Revision: https://phabricator.haskell.org/D3825
* Include libraries which fill holes as deps when linking.Edward Z. Yang2017-10-0311-0/+90
| | | | | | | | | | | | | | | | | | | Fixes the issue reported at https://github.com/haskell/cabal/issues/4755 and fixes #14304 in the GHC tracker. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin, goldfire Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14304 Differential Revision: https://phabricator.haskell.org/D4057
* Bump base to 4.11.0.0Ben Gamari2017-09-214-8/+8
| | | | | | | | | | Bumps numerous submodules. Reviewers: austin, hvr Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3974
* ghc-prim: Bump versionBen Gamari2017-07-231-1/+1
| | | | (cherry picked from commit 8c5405f63c2de0c445ec171aab63c35786544b9e)
* Some tidying up of type pretty-printingSimon Peyton Jones2017-05-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Triggered by the changes in #13677, I ended up doing a bit of refactoring in type pretty-printing. * We were using TyOpPrec and FunPrec rather inconsitently, so I made it consisent. * That exposed the fact that we were a bit undecided about whether to print a + b -> c + d vs (a+b) -> (c+d) and similarly a ~ [b] => blah vs (a ~ [b]) => blah I decided to make TyOpPrec and FunPrec compare equal (in BasicTypes), so (->) is treated as equal precedence with other type operators, so you get the unambiguous forms above, even though they have more parens. We could readily reverse this decision. See Note [Type operator precedence] in BasicTypes * I fixed a bug in pretty-printing of HsType where some parens were omitted by mistake.
* Update Cabal submodule, with necessary wibbles.Edward Z. Yang2017-04-261-2/+2
| | | | | | | | | | | | Test Plan: validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3501
* Only pretty-print binders in closed type families with -fprint-explicit-forallsRyan Scott2017-04-251-2/+2
| | | | | | | | | | | | | | | | | | | Previously, we were unconditionally pretty-printing all type variable binders when pretty-printing closed type families (e.g., in the output of `:info` in GHCi). This threw me for a loop, so let's guard this behind the `-fprint-explicit-foralls` flag. Test Plan: make test TEST=T13420 Reviewers: goldfire, austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13420 Differential Revision: https://phabricator.haskell.org/D3497
* Correctly handle wired in unit IDs in -instantiated-withEdward Z. Yang2017-04-026-0/+54
| | | | | | | | | | | | | | | | | | | Summary: To handle wired in packages, we must rewrite all occurrences of unit ids like base-4.9.0.0 to base. However, I forgot to do this on unit ids that occurred in unit identifiers passed via -instantiated-with. This patch handles that case, plus a test. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3385
* Better test coverage for module reexports in signatures.Edward Z. Yang2017-04-0210-0/+73
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Fix recompilation avoidance bug for implementor of hsig.Edward Z. Yang2017-04-029-0/+73
| | | | | | | | | | | | | | | | | | | | | Summary: I observed a bug where if I modified the module which implemented an hsig in another package, GHC would not recompile the signature in this situation. The root cause was that we were conflating modules from user imports, and "system" module dependencies (from signature merging and instantiation.) So this patch handles them separately. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, bgamari, austin Subscribers: rwbarton, thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3381
* Save renamed syntax when signature merging.Edward Z. Yang2017-03-171-4/+0
| | | | | | | | | | | | | | | | | Summary: This is required to make Haddock work correctly. Comes with a Haddock submodule update for better rendering. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3335
* Fix bkpcabal03 test.Edward Z. Yang2017-03-101-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Improve error messages for skolemsSimon Peyton Jones2017-03-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | In error messages like this • Couldn't match type ‘c’ with ‘f0 (a -> b)’ ‘c’ is a rigid type variable bound by the type signature for: f :: ((a -> b) -> b) -> forall c. c -> a we need to take case both to actually show that 'forall c', and to make sure that its name lines with the 'c' in the error message. This has been shaky for some time, and this commit puts it on solid ground. See TcRnTypes: Note [SigSkol SkolemInfo] The main changes are * SigSkol gets an extra field that records the way in which the type signature was skolemised. * The type in SigSkol is now the /un/-skolemised version * pprSkolemInfo uses the info to make the tidy type line up nicely Lots of error message wibbles!
* Print out sub-libraries of packages more nicely.Edward Z. Yang2017-03-021-1/+1
| | | | | | | | | | | | | | | | | | Previously, we would print out the munged package name which looked like z-bkpcabal01-z-p-0.1.0.0. Now it looks like: bkpcabal01-0.1.0.0:p. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, bgamari, austin Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3235
* Fix roles merging to apply only to non-rep-injective types.Edward Z. Yang2017-03-026-0/+64
| | | | | | | | Test Plan: validate Reviewers: simonpj Subscribers:
* Disallow non-nullary constraint synonyms on class.Edward Z. Yang2017-03-024-4/+40
| | | | | | | | | | Test Plan: validate Reviewers: simonpj, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3230
* More comments on role subtyping, unsoundness fix.Edward Z. Yang2017-03-025-0/+80
| | | | | | | | | | | | | | | | | | Summary: - We incorrectly allowed subroling on injective data in some cases. There is now a test to check for this case, and a Note. - More commentary on how the subtyping with roles works. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: goldfire, austin, simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3222
* Try submodule bumps againBen Gamari2017-02-281-1/+1
| | | | | | Bumps containers, time, and unix submodules. This reverts commit c347a121b07d22fb91172337407986b6541e319d.
* Fix Mac OS X timestamp resolution bug.Edward Z. Yang2017-02-271-0/+5
| | | | | | | | | | Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3229
* Subtyping for roles in signatures.Edward Z. Yang2017-02-265-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit implements the plan in #13140: * Today, roles in signature files default to representational. Let's change the default to nominal, as this is the most flexible implementation side. If a client of the signature needs to coerce with a type, the signature can be adjusted to have more stringent requirements. * If a parameter is declared as nominal in a signature, it can be implemented by a data type which is actually representational. * When merging abstract data declarations, we take the smallest role for every parameter. The roles are considered fix once we specify the structure of an ADT. * Critically, abstract types are NOT injective, so we aren't allowed to make inferences like "if T a ~R T b, then a ~N b" based on the nominal role of a parameter in an abstract type (this would be unsound if the parameter ended up being phantom.) This restriction is similar to the restriction we have on newtypes. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, bgamari, austin, goldfire Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D3123
* Treat all TyCon with hole names as skolem abstract.Edward Z. Yang2017-02-265-5/+5
| | | | | | | | | | | | | | | Summary: Fixes #13335. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: goldfire, austin, simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3211
* tests: remove extra_files.py (#12223)Reid Barton2017-02-265-5/+5
| | | | | | | | | | | | The script I used is included as testsuite/driver/kill_extra_files.py, though at this point it is for mostly historical interest. Some of the tests in libraries/hpc relied on extra_files.py, so this commit includes an update to that submodule. One test in libraries/process also relies on extra_files.py, but we cannot update that submodule so easily, so for now we special-case it in the test driver.
* Record full FieldLabel in ifConFields.Edward Z. Yang2017-02-243-0/+19
| | | | | | | | | | | | | | | | | | | | | | Summary: The previous implementation tried to be "efficient" by storing field names once in IfaceConDecls, and only just enough information for us to reconstruct the FieldLabel. But this came at a bit of code complexity cost. This patch undos the optimization, instead storing a full FieldLabel at each data constructor. Consequently, this fixes bugs #12699 and #13250. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: adamgundry, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3174
* Include OverloadedRecordFields selectors in NameShape.Edward Z. Yang2017-02-233-0/+31
| | | | | | | | | | | | | | | Summary: Fixes #13323. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3175
* Revert recent submodule bumpsBen Gamari2017-02-221-1/+1
| | | | | | | | They broke everything and the solution will be non-trivial. This reverts commit 8ccbc2e5252abd4fa67d155d4fff489ee9929906. This reverts commit c8d995db5d743358b0583fe97f8113bf9047641e. This reverts commit 7153370288e6075c4f8c996ff02227e48805da06.
* Bump Cabal and containers submodulesBen Gamari2017-02-211-1/+1
|
* Bump Cabal submoduleBen Gamari2017-02-201-4/+6
| | | | We are now tracking the 2.0 branch.
* Say 'data' explicitly in IfAbstractTyCon output.Edward Z. Yang2017-02-175-5/+5
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Improvements/bugfixes to signature reexport handling.Edward Z. Yang2017-02-1712-6/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A number of changes: - Keep the TcGblEnv from typechecking the local signature around when we do merging. In particular, we setup tcg_imports and tcg_rdr_env according to the local signature. This improves our error output (for example, see bkpfail04) and also fixes a bug with reexporting modules in signatures (see bkpreex07) - Fix a bug in thinning, where if we had signature A(module A), this previously would have *thinned out* all of the inherited signatures. Now we treat every inherited signature as having come from an import like "import A", so a module A reexport will pick them up. - Recompilation checking now keeps track of dependent source files of the source signature; previously we forgot to retain this info. There's a manual update too. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3133
* Fix recompilation tracking on signatures.Edward Z. Yang2017-02-179-0/+61
| | | | | | | | | | | | | | | | | | Summary: Previously we weren't tracking these dependencies at all, because we couldn't "find" the interface for {A.H}. Now we've associated hole names to the correct module identity so we will pick them up. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3131
* Fix a Backpack recompilation avoidance bug when signatures change.Edward Z. Yang2017-02-1710-1/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Recompilation avoidance checks if -this-unit-id has changed by relying on the "wanted module" check in readIface ("Something is amiss..."). Unfortunately, this check didn't check if the instantiation made sense, which meant that if you changed the signatures of a Backpack package, we'd still treat the old signatures as up-to-date. The way I fixed this was by having findAndReadIface take in a 'Module' representing the /actual/ module we were intending to lookup. We convert this into the 'Module' we expect to see in 'mi_module' and now do a more elaborate check that will also verify that instantiations make sense. Along the way, I robustified the logging infrastructure for recompilation checking, and folded wrongIfaceModErr (which was dead code) into the error message. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3130
* Don't warn about missing methods for instances in signatures.Edward Z. Yang2017-02-143-0/+16
| | | | | | | | | | | | Test Plan: validate Reviewers: bgamari, austin, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3134
* Disable PVP warnings temporarily.Edward Z. Yang2017-02-124-20/+0
| | | | | | | | | While the intent is good, they are actually too aggressive: if a module reexports an identifier from a signature, we will warn (even though we should not!) We'll have to implement this differently. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Slightly reword not-exported message.Edward Z. Yang2017-02-125-7/+7
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Setup more error context for Backpack operations.Edward Z. Yang2017-02-1226-100/+149
| | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3101
* Fix #13214 by correctly setting up dep_orphs for signatures.Edward Z. Yang2017-02-118-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this, I hadn't thought about orphan handling at all. This commit implements the semantics that if a signature (transitively) imports an orphan instance, that instance is considered in scope no matter what the implementing module is. (As it turns out, this is the semantics that falls out when orphans are recorded transitively.) This patch fixes a few bugs: 1. Put semantic modules in dep_orphs rather than identity modules. 2. Don't put the implementing module in dep_orphs when merging signatures (this is a silly bug that happened because we were reusing calculateAvails, which is designed for imports. It mostly works for signature merging, except this case.) 3. When renaming a signature, blast in the orphans of the implementing module inside Dependencies. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3095
* Failing test for #13149.Edward Z. Yang2017-01-222-0/+18
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Preserve coercion axioms when thinning.Edward Z. Yang2017-01-223-0/+13
| | | | | | Forgot to handle these! In they go, plus a test case. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Fix handling of closed type families in Backpack.Edward Z. Yang2017-01-118-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A few related problems: - CoAxioms, like DFuns, are implicit and never exported, so we have to make sure we treat them the same way as DFuns: in RnModIface we need to rename references to them with rnIfaceImplicit and in mergeSignatures we need to NOT check them directly for compatibility (the test on the type family will do this check for us.) - But actually, we weren't checking if the axioms WERE consistent. This is because we were forwarding all embedded CoAxiom references in the type family TyThing to the merged version, but that reference was what checkBootDeclM was using as a comparison point. This is similar to a problem we saw with DFuns. To fix this, I refactored the handling of implicit entities in TcIface for Backpack. See Note [The implicit TypeEnv] for the gory details. Instead of passing the TypeEnv around explicitly, we stuffed it in IfLclEnv. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2928
* Revamp Backpack/hs-boot handling of type class signatures.Edward Z. Yang2017-01-1113-30/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A basket of fixes and improvements: - The permissible things that one can write in a type class definition in an hsig file has been reduced to encompass the following things: - Methods - Default method signatures (but NOT implementation) - MINIMAL pragma It is no longer necessary nor encouraged to specify that a method has a default if it is mentioned in a MINIMAL pragma; the MINIMAL pragma is assumed to provide the base truth as to what methods need to be implemented when writing instances of a type class. - Handling of default method signatures in hsig was previously buggy, as these identifiers were not exported, so we now treat them similarly to DFuns. - Default methods are merged, where methods with defaults override those without. - MINIMAL pragmas are merged by ORing together pragmas. - Matching has been relaxed: a method with a default can be used to fill a signature which did not declare the method as having a default, and a more relaxed MINIMAL pragma can be used (we check if the signature pragma implies the final implementation pragma, on the way fixing a bug with BooleanFormula.implies, see #13073) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2925 GHC Trac Issues: #13041
* Improve Backpack support for fixities.Edward Z. Yang2017-01-119-0/+78
| | | | | | | | | | | | | | | | | | | | | Summary: Two major bug-fixes: - Check that fixities match between hsig and implementation - Merge and preserve fixities when merging signatures Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2919 GHC Trac Issues: #13066
* Warn if you explicitly export an identifier with warning attached.Edward Z. Yang2017-01-111-0/+4
| | | | | | | | | | | | | | | | | | Summary: This won't stop people from attempting to use this identifier (since it is still always going to be in the export list), but having an explicit reference to something people shouldn't use is a smell, so warn about it. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2907
* Attach warnings to non-PVP compatible uses of signatures.Edward Z. Yang2017-01-114-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If you use an inherited signature from another package in your own code, the only valid PVP bound you can specify for this package is an *exact* version bound. This is because the signature is used both covariantly (it provides declarations for import) and contravariantly (it specifies what is required). However, this is a bit distressing if you want to use a PVP-style bound that allows for upgrading a package. So there is a dichotomy: 1. Any signatures that come from packages with exact bounds (this includes, in particular, signature packages, who are included solely to make declarations available), can be used without problem by modules, but 2. Any signatures that come from packages that are version bounded (i.e., any package that also provides modules) must NOT be used, because if they were used, they could break under a PVP policy that allows relaxations in the needed requirements. To help users avoid situation (2), I've added a warning to all signature declarations that come solely from (2). This is not perfect; you might still end up relying on some type identity specified by a signature in a version-bounded package, but it should help catch major errors. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2906
* Support for using only partial pieces of included signatures.Edward Z. Yang2017-01-1135-30/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Generally speaking, it's not possible to "hide" a requirement from a package you include, because if there is some module relying on that requirement, well, you can't just wish it out of existence. However, some packages don't have any modules. For these, we can validly thin out requirements; indeed, this is very convenient if someone has published a large signature package but you only want some of the definitions. This patchset tweaks the interpretation of export lists in signatures: in particular, they no longer need to refer to entities that are defined locally; they range over both the current signature as well as any signatures that were inherited from signature packages (defined by having zero exposed modules.) In the process of doing this, I cleaned up a number of other things: * rnModIface and rnModExports now report errors that occurred during renaming and can propagate these to the TcM monad. This is important because in the current semantics, you can thin out a type which is referenced by a value you keep; in this situation, we need to error (to ensure that all types in signatures are rooted, so that we can determine their identities). * I ended up introducing a new construct 'dependency signature; to bkp files, to make it easier to tell if we were depending on a signature package. It's not difficult for Cabal to figure this out (I already have a patch for it.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2904 GHC Trac Issues: #12994
* base: Bump version to 4.10.0.0Ben Gamari2016-12-155-10/+10
| | | | Updates a number of submodules.
* Load orphan interfaces before checking if module implements signatureEdward Z. Yang2016-12-133-0/+36
| | | | | | | | | | | | | | | | Summary: If we didn't load the orphans, we might conclude an instance is not implemented when it is. See test bkp42. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2841
* Fix recompilation detection when set of signatures to merge changes.Edward Z. Yang2016-12-1212-0/+106
| | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, we only checked to recompile if a signature we previously depended on changed; however, if the -unit-id settings changed, this could have resulted in more or less signatures needing to be merged in; we weren't checking for this case. (Note that this logic is irrelevant for normal module imports, which we also check using -unit-id, as we record each import and redo it, forcing a recompile if the result changed.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2832
* Sanity check if we pick up an hsig file without -instantiated-with.Edward Z. Yang2016-12-124-8/+8
| | | | | | | | | | | | | | | | | | | | | | Summary: Previously we would just let compilation proceed along until we tried to pull up the Module for the hsig file, and get main:A instead of <A>, and get a mysterious error. Check for this earlier! Fixes #12955. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2815 GHC Trac Issues: #12955
* Reduce qualification in error messages from signature matching.Edward Z. Yang2016-12-0814-50/+48
| | | | | | | | | | | | | | | | | | Summary: Previously, we always qualified names, even if they were defined in the modules we were matching. Adding the exports of the implementing module into the RdrEnv greatly reduces the amount of qualification (although we still can't qualify things that the signature *imported*.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2803