- | opt_GlasgowExts
- = rnPat pat `thenRn` \ (pat', fvs1) ->
- rnHsType doc ty `thenRn` \ (ty', fvs2) ->
- returnRn (SigPatIn pat' ty', fvs1 `plusFV` fvs2)
-
- | otherwise
- = addErrRn (patSigErr ty) `thenRn_`
- rnPat pat
+ = doptsRn dopt_GlasgowExts `thenRn` \ opt_GlasgowExts ->
+
+ if opt_GlasgowExts
+ then rnPat pat `thenRn` \ (pat', fvs1) ->
+ rnHsType doc ty `thenRn` \ (ty', fvs2) ->
+ returnRn (SigPatIn pat' ty', fvs1 `plusFV` fvs2)
+
+ else addErrRn (patSigErr ty) `thenRn_`
+ rnPat pat