- = pushSrcLocRn src_loc $
- lookupBndrRn v `thenRn` \ new_v ->
- rnHsSigType (\ sty -> ppr sty v) ty `thenRn` \ new_ty ->
- returnRn (Sig new_v new_ty src_loc)
-
-renameSig (SpecSig v ty using src_loc)
- = pushSrcLocRn src_loc $
- lookupBndrRn v `thenRn` \ new_v ->
- rnHsSigType (\ sty -> ppr sty v) ty `thenRn` \ new_ty ->
- rn_using using `thenRn` \ new_using ->
- returnRn (SpecSig new_v new_ty new_using src_loc)
- where
- rn_using Nothing = returnRn Nothing
- rn_using (Just x) = lookupOccRn x `thenRn` \ new_x ->
- returnRn (Just new_x)
-
-renameSig (InlineSig v src_loc)
- = pushSrcLocRn src_loc $
- lookupBndrRn v `thenRn` \ new_v ->
- returnRn (InlineSig new_v src_loc)
-
-renameSig (DeforestSig v src_loc)
- = pushSrcLocRn src_loc $
- lookupBndrRn v `thenRn` \ new_v ->
- returnRn (DeforestSig new_v src_loc)
-
-renameSig (MagicUnfoldingSig v str src_loc)
- = pushSrcLocRn src_loc $
- lookupBndrRn v `thenRn` \ new_v ->
- returnRn (MagicUnfoldingSig new_v str src_loc)
+ = addSrcLoc src_loc $
+ lookupSigOccRn v `thenM` \ new_v ->
+ rnHsSigType (quotes (ppr v)) ty `thenM` \ new_ty ->
+ returnM (Sig new_v new_ty src_loc)
+
+renameSig (SpecInstSig ty src_loc)
+ = 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 (FixSig (FixitySig v fix src_loc))
+ = addSrcLoc src_loc $
+ lookupSigOccRn v `thenM` \ new_v ->
+ returnM (FixSig (FixitySig new_v fix 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)