Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alexbiehl-gc
GHC
Commits
b6973e4c
Commit
b6973e4c
authored
27 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
[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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/typecheck/TcInstDcls.lhs
+9
-6
9 additions, 6 deletions
ghc/compiler/typecheck/TcInstDcls.lhs
with
9 additions
and
6 deletions
ghc/compiler/typecheck/TcInstDcls.lhs
+
9
−
6
View file @
b6973e4c
...
@@ -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("
N
o explicit method nor default method for") <+> ppr sty sel_id,
= sep [ptext SLIT("
Warning: n
o 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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment