import Generics
import Class
import TyCon
-import Type
import MkId
import Id
import Name
import Var
import NameEnv
import NameSet
-import OccName
import RdrName
import Outputable
import PrelNames
import DynFlags
import ErrUtils
import Util
-import Unique
import ListSetOps
import SrcLoc
import Maybes
-import List
import BasicTypes
import Bag
import FastString
import Control.Monad
+import Data.List
\end{code}
meth_sig_fn _ = sig_fn sel_name
meth_prag_fn _ = prag_fn sel_name
- -- See Note [Silly default-method bind]
- -- (possibly out of date)
; (top_dm_id, bind) <- tcInstanceMethodBody rigid_info
clas tyvars [this_dict] theta (mkTyVarTys tyvars)
Nothing sel_id
instance C 1 where
op Unit = ...
+
\begin{code}
mkGenericDefMethBind :: Class -> [Type] -> Id -> Name -> TcM (LHsBind Name)
mkGenericDefMethBind clas inst_tys sel_id meth_name
group `lengthExceeds` 1]
get_uniq (tc,_) = getUnique tc
- mapM (addErrTc . dupGenericInsts) bad_groups
+ mapM_ (addErrTc . dupGenericInsts) bad_groups
-- Check that there is an InstInfo for each generic type constructor
let
dfun_id = mkDictFunId dfun_name tyvars inst_theta clas [inst_ty]
ispec = mkLocalInstance dfun_id overlap_flag
- return (InstInfo { iSpec = ispec, iBinds = VanillaInst binds [] })
+ return (InstInfo { iSpec = ispec, iBinds = VanillaInst binds [] False })
\end{code}