From: simonpj Date: Thu, 9 Mar 2000 14:11:59 +0000 (+0000) Subject: [project @ 2000-03-09 14:11:59 by simonpj] X-Git-Tag: Approximately_9120_patches~5028 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d17dea55bb084dbb586f4576018168b192dc6c46;p=ghc-hetmet.git [project @ 2000-03-09 14:11:59 by simonpj] Correct bug in local fixity decls (reported by Michael Hudson) --- diff --git a/ghc/compiler/rename/RnBinds.lhs b/ghc/compiler/rename/RnBinds.lhs index d06319d..eef2204 100644 --- a/ghc/compiler/rename/RnBinds.lhs +++ b/ghc/compiler/rename/RnBinds.lhs @@ -246,19 +246,21 @@ rnMonoBinds mbinds sigs thing_inside -- Non-empty monobinds binder_occ_fm = listToFM [(nameOccName x,x) | x <- new_mbinders] in - -- Report the fixity declarations in this group that - -- don't refer to any of the group's binders. - -- - mapRn_ (unknownSigErr) fixes_not_for_me `thenRn_` + -- Rename the signatures renameSigs False binder_set (lookupSigOccRn binder_occ_fm) sigs_for_me `thenRn` \ (siglist, sig_fvs) -> + + -- Report the fixity declarations in this group that + -- don't refer to any of the group's binders. + -- Then install the fixity declarations that do apply here + -- Notice that they scope over thing_inside too + mapRn_ (unknownSigErr) fixes_not_for_me `thenRn_` let fixity_sigs = [(name,sig) | FixSig sig@(FixitySig name _ _) <- siglist ] in - -- Install the fixity declarations that do apply here and go. - extendFixityEnv fixity_sigs ( - rn_mono_binds siglist mbinds - ) `thenRn` \ (binds, bind_fvs) -> + extendFixityEnv fixity_sigs $ + + rn_mono_binds siglist mbinds `thenRn` \ (binds, bind_fvs) -> -- Now do the "thing inside", and deal with the free-variable calculations thing_inside binds `thenRn` \ (result,result_fvs) ->