summaryrefslogtreecommitdiff
path: root/rules/distdir-way-opts.mk
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-08-26 16:17:18 -0400
committerBen Gamari <ben@smart-cactus.org>2017-08-29 09:54:07 -0400
commitdb3a8e168ad81f54ec58eebc4c75a0eaad889daf (patch)
tree929a7878218f5bbf609d74788e74e5e5a255f06c /rules/distdir-way-opts.mk
parent248ad30385acc0f81f1959b6345a7388be76dc85 (diff)
downloadhaskell-db3a8e168ad81f54ec58eebc4c75a0eaad889daf.tar.gz
desugar: Ensure that a module's dep_orphs doesn't contain itself
Consider that we have two modules, A and B, both with hs-boot files, * A.hs contains a SOURCE import of B * B.hs-boot contains a SOURCE import of A * A.hs-boot declares an orphan instance * A.hs defines the orphan instance In this case, B's dep_orphs will contain A due to its SOURCE import of A. Consequently, A will contain itself in its imp_orphs due to its import of B. This fact would end up being recorded in A's interface file. This would then break the invariant asserted by calculateAvails that a module does not itself in its dep_orphs. This was the cause of #14128. The solution is to remove self-references from imp_orphs when constructing dep_orphs; we already did a similar thing for dep_mods. I believe we should do the same for dep_finsts, although I'm treating this as a separate bug. Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3892
Diffstat (limited to 'rules/distdir-way-opts.mk')
0 files changed, 0 insertions, 0 deletions