Skip to content
Snippets Groups Projects
Commit b6973e4c authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1997-10-17 14:14:00 by simonm]

remove OmitDefaultInstanceMethods (unused).
parent d99295c0
No related branches found
No related tags found
No related merge requests found
...@@ -61,8 +61,9 @@ import Unify ( unifyTauTy, unifyTauTyLists ) ...@@ -61,8 +61,9 @@ import Unify ( unifyTauTy, unifyTauTyLists )
import Bag ( emptyBag, unitBag, unionBags, unionManyBags, import Bag ( emptyBag, unitBag, unionBags, unionManyBags,
concatBag, foldBag, bagToList, listToBag, concatBag, foldBag, bagToList, listToBag,
Bag ) Bag )
import CmdLineOpts ( opt_GlasgowExts, opt_OmitDefaultInstanceMethods, import CmdLineOpts ( opt_GlasgowExts,
opt_PprUserLength, opt_SpecialiseOverloaded opt_PprUserLength, opt_SpecialiseOverloaded,
opt_WarnMissingMethods
) )
import Class ( GenClass, import Class ( GenClass,
classBigSig, classBigSig,
...@@ -470,10 +471,12 @@ tcInstMethodBind clas inst_ty meth_binds (sel_id, maybe_dm_id) ...@@ -470,10 +471,12 @@ tcInstMethodBind clas inst_ty meth_binds (sel_id, maybe_dm_id)
Nothing -> mk_default_bind default_meth_name Nothing -> mk_default_bind default_meth_name
in in
-- Warn if no method binding -- Warn if no method binding, only if -fwarn-missing-methods
warnTc (not (maybeToBool maybe_meth_bind) &&
warnTc (opt_WarnMissingMethods &&
not (maybeToBool maybe_meth_bind) &&
not (maybeToBool maybe_dm_id)) not (maybeToBool maybe_dm_id))
(omittedMethodWarn sel_id clas) `thenNF_Tc_` (omittedMethodWarn sel_id clas) `thenNF_Tc_`
-- Typecheck the method binding -- Typecheck the method binding
tcMethodBind clas origin inst_ty sel_id the_meth_bind tcMethodBind clas origin inst_ty sel_id the_meth_bind
...@@ -754,7 +757,7 @@ nonBoxedPrimCCallErr clas inst_ty sty ...@@ -754,7 +757,7 @@ nonBoxedPrimCCallErr clas inst_ty sty
ppr sty inst_ty]) ppr sty inst_ty])
omittedMethodWarn sel_id clas sty omittedMethodWarn sel_id clas sty
= sep [ptext SLIT("No explicit method nor default method for") <+> ppr sty sel_id, = sep [ptext SLIT("Warning: no explicit method nor default method for") <+> ppr sty sel_id,
ptext SLIT("in an instance declaration for") <+> ppr sty clas] ptext SLIT("in an instance declaration for") <+> ppr sty clas]
instMethodNotInClassErr occ clas sty instMethodNotInClassErr occ clas sty
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment