summaryrefslogtreecommitdiff
path: root/compiler/iface/TcIface.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-12 02:44:01 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-17 13:43:07 -0800
commitca543154bbf0ec36ee2654050ee67a467420449f (patch)
tree0962e9c12f0aab2631d20f80263d6a96ecbd5346 /compiler/iface/TcIface.hs
parent0e7601749d53d59df528ede996d8b54352051498 (diff)
downloadhaskell-ca543154bbf0ec36ee2654050ee67a467420449f.tar.gz
Fix a Backpack recompilation avoidance bug when signatures change.
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
Diffstat (limited to 'compiler/iface/TcIface.hs')
-rw-r--r--compiler/iface/TcIface.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs
index d2ddeb2b82..a920945e16 100644
--- a/compiler/iface/TcIface.hs
+++ b/compiler/iface/TcIface.hs
@@ -459,7 +459,7 @@ tcHiBootIface hsc_src mod
-- to check consistency against, rather than just when we notice
-- that an hi-boot is necessary due to a circular import.
{ read_result <- findAndReadIface
- need (fst (splitModuleInsts mod))
+ need (fst (splitModuleInsts mod)) mod
True -- Hi-boot file
; case read_result of {