- = pushSrcLocRn src_loc $
- lookupOccRn v `thenRn` \ new_v ->
- rnHsSigType (quotes (ppr v)) ty `thenRn` \ (new_ty,fvs) ->
- returnRn (SpecSig new_v new_ty src_loc, fvs `addOneFV` new_v)
-
-renameSig (FixSig (FixitySig v fix src_loc))
- = pushSrcLocRn src_loc $
- lookupOccRn v `thenRn` \ new_v ->
- returnRn (FixSig (FixitySig new_v fix src_loc), unitFV new_v)
-
-renameSig (DeprecSig (Deprecation ie txt) src_loc)
- = pushSrcLocRn src_loc $
- renameIE lookupOccRn ie `thenRn` \ (new_ie, fvs) ->
- returnRn (DeprecSig (Deprecation new_ie txt) src_loc, fvs)
-
-renameSig (InlineSig v p src_loc)
- = pushSrcLocRn src_loc $
- lookupOccRn v `thenRn` \ new_v ->
- returnRn (InlineSig new_v p src_loc, unitFV new_v)
-
-renameSig (NoInlineSig v p src_loc)
- = pushSrcLocRn src_loc $
- lookupOccRn v `thenRn` \ new_v ->
- returnRn (NoInlineSig new_v p src_loc, unitFV new_v)
-\end{code}
-
-\begin{code}
-renameIE :: (RdrName -> RnMS Name) -> IE RdrName -> RnMS (IE Name, FreeVars)
-renameIE lookup_occ_nm (IEVar v)
- = lookup_occ_nm v `thenRn` \ new_v ->
- returnRn (IEVar new_v, unitFV new_v)
-
-renameIE lookup_occ_nm (IEThingAbs v)
- = lookup_occ_nm v `thenRn` \ new_v ->
- returnRn (IEThingAbs new_v, unitFV new_v)
-
-renameIE lookup_occ_nm (IEThingAll v)
- = lookup_occ_nm v `thenRn` \ new_v ->
- returnRn (IEThingAll new_v, unitFV new_v)
-
-renameIE lookup_occ_nm (IEThingWith v vs)
- = lookup_occ_nm v `thenRn` \ new_v ->
- mapRn lookup_occ_nm vs `thenRn` \ new_vs ->
- returnRn (IEThingWith new_v new_vs, plusFVs [ unitFV x | x <- new_v:new_vs ])
-
-renameIE lookup_occ_nm (IEModuleContents m)
- = returnRn (IEModuleContents m, emptyFVs)