Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,268
Issues
4,268
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
408
Merge Requests
408
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
d0c6c8b3
Commit
d0c6c8b3
authored
Nov 02, 2006
by
simonpj@microsoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused lookupDeprec function
parent
26a4a13d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
compiler/main/HscTypes.lhs
compiler/main/HscTypes.lhs
+1
-8
compiler/rename/RnNames.lhs
compiler/rename/RnNames.lhs
+5
-4
No files found.
compiler/main/HscTypes.lhs
View file @
d0c6c8b3
...
...
@@ -51,7 +51,7 @@ module HscTypes (
GenAvailInfo(..), AvailInfo, RdrAvailInfo,
IfaceExport,
Deprecations, DeprecTxt,
lookupDeprec,
plusDeprecs,
Deprecations, DeprecTxt, plusDeprecs,
PackageInstEnv, PackageRuleBase,
...
...
@@ -806,13 +806,6 @@ mkIfaceDepCache (DeprecSome pairs) = lookupOccEnv (mkOccEnv pairs) . nameOccName
emptyIfaceDepCache :: Name -> Maybe DeprecTxt
emptyIfaceDepCache n = Nothing
lookupDeprec :: Deprecations -> Name -> Maybe DeprecTxt
lookupDeprec NoDeprecs name = Nothing
lookupDeprec (DeprecAll txt) name = Just txt
lookupDeprec (DeprecSome env) name = case lookupNameEnv env name of
Just (_, txt) -> Just txt
Nothing -> Nothing
plusDeprecs :: Deprecations -> Deprecations -> Deprecations
plusDeprecs d NoDeprecs = d
plusDeprecs NoDeprecs d = d
...
...
compiler/rename/RnNames.lhs
View file @
d0c6c8b3
...
...
@@ -918,7 +918,7 @@ reportDeprecations dflags tcg_env
check hpt pit gre@(GRE {gre_name = name, gre_prov = Imported (imp_spec:_)})
| name `elemNameSet` used_names
, Just deprec_txt <- lookupDeprec dflags hpt pit gre
, Just deprec_txt <- lookup
Imp
Deprec dflags hpt pit gre
= addWarnAt (importSpecLoc imp_spec)
(sep [ptext SLIT("Deprecated use of") <+>
pprNonVarNameSpace (occNameSpace (nameOccName name)) <+>
...
...
@@ -940,9 +940,10 @@ reportDeprecations dflags tcg_env
-- the defn of a non-deprecated thing, when changing a module's
-- interface
lookupDeprec :: DynFlags -> HomePackageTable -> PackageIfaceTable
-> GlobalRdrElt -> Maybe DeprecTxt
lookupDeprec dflags hpt pit gre
lookupImpDeprec :: DynFlags -> HomePackageTable -> PackageIfaceTable
-> GlobalRdrElt -> Maybe DeprecTxt
-- The name is definitely imported, so look in HPT, PIT
lookupImpDeprec dflags hpt pit gre
= case lookupIfaceByModule dflags hpt pit (nameModule name) of
Just iface -> mi_dep_fn iface name `seqMaybe` -- Bleat if the thing, *or
case gre_par gre of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment