projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2000-10-23 16:43:42 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
main
/
HscTypes.lhs
diff --git
a/ghc/compiler/main/HscTypes.lhs
b/ghc/compiler/main/HscTypes.lhs
index
84b129b
..
a5d5816
100644
(file)
--- a/
ghc/compiler/main/HscTypes.lhs
+++ b/
ghc/compiler/main/HscTypes.lhs
@@
-21,11
+21,13
@@
module HscTypes (
WhetherHasOrphans, ImportVersion, WhatsImported(..),
PersistentRenamerState(..), IsBootInterface, Avails, DeclsMap,
WhetherHasOrphans, ImportVersion, WhatsImported(..),
PersistentRenamerState(..), IsBootInterface, Avails, DeclsMap,
- IfaceInsts, IfaceRules, Deprecations(..), GatedDecl,
+ IfaceInsts, IfaceRules, GatedDecl,
OrigNameEnv(..), OrigNameNameEnv, OrigNameIParamEnv,
AvailEnv, AvailInfo, GenAvailInfo(..),
PersistentCompilerState(..),
OrigNameEnv(..), OrigNameNameEnv, OrigNameIParamEnv,
AvailEnv, AvailInfo, GenAvailInfo(..),
PersistentCompilerState(..),
+ Deprecations(..), lookupDeprec,
+
InstEnv, ClsInstEnv, DFunId,
GlobalRdrEnv, RdrAvailInfo,
InstEnv, ClsInstEnv, DFunId,
GlobalRdrEnv, RdrAvailInfo,
@@
-266,6
+268,13
@@
data Deprecations = NoDeprecs
| DeprecSome (NameEnv DeprecTxt) -- Some things deprecated
-- Just "big" names
| DeprecSome (NameEnv DeprecTxt) -- Some things deprecated
-- Just "big" names
+lookupDeprec :: ModIface -> Name -> Maybe DeprecTxt
+lookupDeprec iface name
+ = case mi_deprecs iface of
+ NoDeprecs -> Nothing
+ DeprecAll txt -> Just txt
+ DeprecSome env -> lookupNameEnv env name
+
type InstEnv = UniqFM ClsInstEnv -- Maps Class to instances for that class
type ClsInstEnv = [(TyVarSet, [Type], DFunId)] -- The instances for a particular class
type DFunId = Id
type InstEnv = UniqFM ClsInstEnv -- Maps Class to instances for that class
type ClsInstEnv = [(TyVarSet, [Type], DFunId)] -- The instances for a particular class
type DFunId = Id