summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@fb.com>2018-11-11 22:39:29 -0500
committerEdward Z. Yang <ezyang@cs.stanford.edu>2018-11-11 22:39:36 -0500
commit13ff0b7ced097286e0d7b054f050871effe07f86 (patch)
tree55b06a8cb6a36f5e459e6bb31766149172e28f87 /compiler/codeGen
parent98f8e1c2454b8c99cbb225e4a8a544288eeb082a (diff)
downloadhaskell-13ff0b7ced097286e0d7b054f050871effe07f86.tar.gz
Fix #15594 (--abi-hash with Backpack sometimes fails)
Summary: For holes, its necessary to "see through" the instantiation of the hole to get accurate family instance dependencies. For example, if B imports <A>, and <A> is instantiated with F, we must grab and include all of the dep_finsts from F to have an accurate transitive dep_finsts list. However, we MUST NOT do this for regular modules. First, for efficiency reasons, doing this bloats the the dep_finsts list, because we *already* had those modules in the list (it wasn't a hole module, after all). But there's a second, more important correctness consideration: we perform module renaming when running --abi-hash. In this case, GHC's contract to the user is that it will NOT go and read out interfaces of any dependencies (https://github.com/haskell/cabal/issues/3633); the point of --abi-hash is just to get a hash of the on-disk interfaces for this *specific* package. If we go off and tug on the interface for /everything/ in dep_finsts, we're gonna have a bad time. (It's safe to do do this for hole modules, though, because the hmap for --abi-hash is always trivial, so the interface we request is local. Though, maybe we ought not to do it in this case either...) Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: validate Reviewers: alexbiehl, goldfire, bgamari Subscribers: ppk, shlevy, rwbarton, carter GHC Trac Issues: #15594 Differential Revision: https://phabricator.haskell.org/D5123
Diffstat (limited to 'compiler/codeGen')
0 files changed, 0 insertions, 0 deletions