import UniqFM ( isNullUFM )
import FiniteMap ( elemFM )
import UniqSet ( emptyUniqSet )
-import Util ( removeDups )
-import ListSetOps ( unionLists )
+import ListSetOps ( unionLists, removeDups )
import Maybes ( maybeToBool )
import Outputable
\end{code}
= lookupOccRn con `thenRn` \ con' ->
rnRpats rpats `thenRn` \ (rpats', fvs) ->
returnRn (RecPatIn con' rpats', fvs `addOneFV` con')
+rnPat (TypePatIn name) =
+ (rnHsType (text "type pattern") name) `thenRn` \ (name', fvs) ->
+ returnRn (TypePatIn name', fvs)
\end{code}
************************************************************************
doc_sig = text "a pattern type-signature"
doc_pats = text "in a pattern match"
in
- bindTyVarsFVRn doc_sig (map UserTyVar forall_tyvars) $ \ sig_tyvars ->
+ bindNakedTyVarsFVRn doc_sig forall_tyvars $ \ sig_tyvars ->
-- Note that we do a single bindLocalsRn for all the
-- matches together, so that we spot the repeated variable in
rnExpr b2 `thenRn` \ (b2', fvB2) ->
returnRn (HsIf p' b1' b2' src_loc, plusFVs [fvP, fvB1, fvB2])
+rnExpr (HsType a) =
+ (rnHsType doc a) `thenRn` \ (t, fvT) -> returnRn (HsType t, fvT)
+ where doc = text "renaming a type pattern"
+
+
rnExpr (ArithSeqIn seq)
= lookupOrigName enumClass_RDR `thenRn` \ enum ->
rn_seq seq `thenRn` \ (new_seq, fvs) ->