summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-12-20 17:49:34 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2018-12-21 16:54:17 +0000
commita57d5c4d3e39ab9ac2c31431b5e38818359fa5b5 (patch)
tree1a048f360c7ab359703ae869dcdd8e693094becb /ghc.mk
parent66ce7de15dbc594e6890b5651dba3aa669c8d5fc (diff)
downloadhaskell-a57d5c4d3e39ab9ac2c31431b5e38818359fa5b5.tar.gz
Fix treatment of hi-boot files and dfuns
Trac #16038 exposed the fact that TcRnDriver.checkHiBootIface was creating a binding, in the module being compiled, for $fxBlah = $fBlah but $fxBlah was a /GlobalId/. But all bindings should be for /LocalIds/ else dependency analysis goes down the tubes. * I added a CoreLint check that an occurrence of a GlobalId is not bound by an binding of a LocalId. (There is already a binding-site check that no binding binds a GlobalId.) * I refactored (and actually signficantly simplified) the tricky code for dfuns in checkHiBootIface to ensure that we get LocalIds for those boot-dfuns. Alas, I then got "duplicate instance" messages when compiling HsExpr. It turns out that this is a long-standing, but extremely delicate, bug: even before this patch, if you compile HsExpr with -ddump-tc-trace, you get "duplicate instance". Without -ddump-tc-trace, it's OK. What a mess! The reason for the duplicate-instance is now explained in Note [Loading your own hi-boot file] in LoadIface. I fixed it by a Gross Hack in LoadIface.loadInterface. This is at least no worse than before. But there should be a better way. I have opened #16081 for this.
Diffstat (limited to 'ghc.mk')
0 files changed, 0 insertions, 0 deletions