- returnTc (local_ty, (sel_id, dm_info_id))
-\end{code}
-
-
-%************************************************************************
-%* *
-\subsection[ClassDcl-pass2]{Class decls pass 2: default methods}
-%* *
-%************************************************************************
-
-@mkImplicitClassBinds@ produces a binding for the selector function for each method
-and superclass dictionary.
-
-\begin{code}
-mkImplicitClassBinds :: [Class] -> NF_TcM ([Id], TcMonoBinds)
-mkImplicitClassBinds classes
- = returnNF_Tc (concat cls_ids_s, andMonoBindList binds_s)
- -- The selector binds are already in the selector Id's unfoldings
- -- We don't return the data constructor etc from the class,
- -- because that's done via the class's TyCon
- where
- (cls_ids_s, binds_s) = unzip (map mk_implicit classes)
-
- mk_implicit clas = (sel_ids, binds)
- where
- sel_ids = classSelIds clas
- binds | isLocallyDefined clas = idsToMonoBinds sel_ids
- | otherwise = EmptyMonoBinds