From: simonmar Date: Tue, 21 Aug 2001 14:34:25 +0000 (+0000) Subject: [project @ 2001-08-21 14:34:25 by simonmar] X-Git-Tag: Approximately_9120_patches~1151 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a5edcf179fc508632e2908c86676b91b6404d29d;hp=a8d3e136e9bb989fde0ec655d291d3d2e7036fff;p=ghc-hetmet.git [project @ 2001-08-21 14:34:25 by simonmar] comment reformatting only --- diff --git a/ghc/compiler/rename/RnHiFiles.lhs b/ghc/compiler/rename/RnHiFiles.lhs index c7ea623..3ea0fc4 100644 --- a/ghc/compiler/rename/RnHiFiles.lhs +++ b/ghc/compiler/rename/RnHiFiles.lhs @@ -594,13 +594,15 @@ lookupFixityRn name returnRn (lookupLocalFixity local_fix_env name) else -- It's imported - -- For imported names, we have to get their fixities by doing a loadHomeInterface, - -- and consulting the Ifaces that comes back from that, because the interface - -- file for the Name might not have been loaded yet. Why not? Suppose you import module A, - -- which exports a function 'f', which is defined in module B. Then B isn't loaded - -- right away (after all, it's possible that nothing from B will be used). - -- When we come across a use of 'f', we need to know its fixity, and it's then, - -- and only then, that we load B.hi. That is what's happening here. + -- For imported names, we have to get their fixities by doing a + -- loadHomeInterface, and consulting the Ifaces that comes back + -- from that, because the interface file for the Name might not + -- have been loaded yet. Why not? Suppose you import module A, + -- which exports a function 'f', which is defined in module B. + -- Then B isn't loaded right away (after all, it's possible that + -- nothing from B will be used). When we come across a use of + -- 'f', we need to know its fixity, and it's then, and only + -- then, that we load B.hi. That is what's happening here. loadHomeInterface doc name `thenRn` \ iface -> returnRn (lookupNameEnv (mi_fixities iface) name `orElse` defaultFixity) where