-- Check the context
{ dict_binds <- tcSimplifyCheck
- (ptext SLIT("class") <+> ppr clas)
+ loc
tyvars
[this_dict]
insts_needed
let
[(_, Just sig, local_meth_id)] = mono_bind_infos
+ loc = sig_loc sig
in
addErrCtxtM (sigCtxt sel_id inst_tyvars inst_theta (idType meth_id)) $
- newDictBndrs (sig_loc sig) (sig_theta sig) `thenM` \ meth_dicts ->
+ newDictBndrs loc (sig_theta sig) `thenM` \ meth_dicts ->
let
meth_tvs = sig_tvs sig
all_tyvars = meth_tvs ++ inst_tyvars
all_insts = avail_insts ++ meth_dicts
in
tcSimplifyCheck
- (ptext SLIT("class or instance method") <+> quotes (ppr sel_id))
- all_tyvars all_insts meth_lie `thenM` \ lie_binds ->
+ loc all_tyvars all_insts meth_lie `thenM` \ lie_binds ->
checkSigTyVars all_tyvars `thenM_`
other -> Nothing
other -> Nothing
-isInstDecl (SigOrigin (InstSkol _)) = True
-isInstDecl (SigOrigin (ClsSkol _)) = False
+isInstDecl (SigOrigin InstSkol) = True
+isInstDecl (SigOrigin (ClsSkol _)) = False
\end{code}