+ binder_set = mkNameSet new_mbinders
+
+ -- Weed out the fixity declarations that do not
+ -- apply to any of the binders in this group.
+ (sigs_for_me, fixes_not_for_me) = partition forLocalBind sigs
+
+ forLocalBind (FixSig sig@(FixitySig name _ _ )) =
+ isJust (lookupFM binder_occ_fm (rdrNameOcc name))
+ forLocalBind _ = True
+
+ binder_occ_fm = addListToFM emptyFM (map (\ x -> (nameOccName x,x)) new_mbinders)
+
+ -- the names appearing in the sigs have to be bound by
+ -- this group's binders.
+ lookup_occ_rn_sig rdr_name =
+ case lookupFM binder_occ_fm (rdrNameOcc rdr_name) of
+ Nothing -> failUnboundNameErrRn rdr_name
+ Just x -> returnRn x
+ 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_`
+ renameSigs False binder_set lookup_occ_rn_sig sigs_for_me
+ `thenRn` \ (siglist, sig_fvs) ->
+ let
+ fixity_sigs = [(name,sig) | FixSig sig@(FixitySig name _ _) <- siglist ]