- = pushSrcLocRn src_loc $
- rnHsSigType (text "A SPECIALISE instance pragma") ty `thenRn` \ (new_ty, fvs) ->
- returnRn (SpecInstSig new_ty src_loc, fvs)
-
-renameSig (SpecSig v ty using src_loc)
- = pushSrcLocRn src_loc $
- lookupOccRn v `thenRn` \ new_v ->
- rnHsSigType (quotes (ppr v)) ty `thenRn` \ (new_ty,fvs1) ->
- rn_using using `thenRn` \ (new_using,fvs2) ->
- returnRn (SpecSig new_v new_ty new_using src_loc, fvs1 `plusFV` fvs2)
- where
- rn_using Nothing = returnRn (Nothing, emptyFVs)
- rn_using (Just x) = lookupOccRn x `thenRn` \ new_x ->
- returnRn (Just new_x, unitFV new_x)
-
-renameSig (InlineSig v src_loc)
- = pushSrcLocRn src_loc $
- lookupOccRn v `thenRn` \ new_v ->
- returnRn (InlineSig new_v src_loc, emptyFVs)
-
-renameSig (FixSig (FixitySig v fix src_loc))
- = pushSrcLocRn src_loc $
- lookupOccRn v `thenRn` \ new_v ->
- returnRn (FixSig (FixitySig new_v fix src_loc), emptyFVs)
-
-renameSig (NoInlineSig v src_loc)
- = pushSrcLocRn src_loc $
- lookupOccRn v `thenRn` \ new_v ->
- returnRn (NoInlineSig new_v src_loc, emptyFVs)
+ = addSrcLoc src_loc $
+ rnHsType (text "A SPECIALISE instance pragma") ty `thenM` \ new_ty ->
+ returnM (SpecInstSig new_ty src_loc)
+
+renameSig (SpecSig v ty src_loc)
+ = addSrcLoc src_loc $
+ lookupSigOccRn v `thenM` \ new_v ->
+ rnHsSigType (quotes (ppr v)) ty `thenM` \ new_ty ->
+ returnM (SpecSig new_v new_ty src_loc)
+
+renameSig (InlineSig b v p src_loc)
+ = addSrcLoc src_loc $
+ lookupSigOccRn v `thenM` \ new_v ->
+ returnM (InlineSig b new_v p src_loc)