+ ; returnM (inst_infos, unionManyBags (extra_binds : aux_binds_s))
+ }
+
+-----------------------------------------
+mkGenericBinds tycl_decls
+ = do { tcs <- mapM tcLookupTyCon
+ [ tc_name |
+ L _ (TyData { tcdLName = L _ tc_name }) <- tycl_decls]
+ -- We are only interested in the data type declarations
+ ; return (unionManyBags [ mkTyConGenericBinds tc |
+ tc <- tcs, tyConHasGenerics tc ]) }
+ -- And then only in the ones whose 'has-generics' flag is on