+ = dataConOccInstPat uniqs occs con inst_tys
+ where
+ -- dataConOccInstPat doesn't actually make use of the OccName directly for
+ -- existential and coercion variable binders, so it is right to just
+ -- use the VarName namespace for all of the OccNames
+ occs = mk_occs 1
+ mk_occs n = mkVarOcc ("ipv" ++ show n) : mk_occs (n+1)
+
+dataConOccInstPat :: [Unique] -- A long enough list of uniques, at least one for each binder
+ -> [OccName] -- An equally long list of OccNames to use
+ -> DataCon
+ -> [Type] -- Types to instantiate the universally quantified tyvars
+ -> ([TyVar], [CoVar], [Id]) -- Return instantiated variables
+-- This function actually does the job specified in the comment for
+-- dataConInstPat, but uses the specified list of OccNames. This is
+-- is necessary for use in e.g. tcIfaceDataAlt
+dataConOccInstPat uniqs occs con inst_tys