From: simonpj Date: Fri, 8 Dec 2000 12:02:01 +0000 (+0000) Subject: [project @ 2000-12-08 12:01:44 by simonpj] X-Git-Tag: Approximately_9120_patches~3161 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0dbe3f27d140fabca17fdc0828983d0c38966135;p=ghc-hetmet.git [project @ 2000-12-08 12:01:44 by simonpj] Rename omitIfaceSigForId to isImplicitId --- diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index b907563..4026676 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -22,7 +22,7 @@ module Id ( zapFragileIdInfo, zapLamIdInfo, -- Predicates - omitIfaceSigForId, isDeadBinder, + isImplicitId, isDeadBinder, externallyVisibleId, isIP, isSpecPragmaId, isRecordSelector, @@ -273,22 +273,22 @@ isLocalId id \end{code} -omitIfaceSigForId tells whether an Id's info is implied by other declarations, -so we don't need to put its signature in an interface file, even if it's mentioned -in some other interface unfolding. +isImplicitId tells whether an Id's info is implied by other +declarations, so we don't need to put its signature in an interface +file, even if it's mentioned in some other interface unfolding. \begin{code} -omitIfaceSigForId :: Id -> Bool -omitIfaceSigForId id +isImplicitId :: Id -> Bool +isImplicitId id = ASSERT2( not (omit && nameIsLocallyDefined (idName id) && idTyGenInfo id /= TyGenNever), ppr id ) -- mustn't omit type signature for a name whose type might change! omit where - omit = omitIfaceSigForId' id + omit = isImplicitId' id -omitIfaceSigForId' id +isImplicitId' id = case idFlavour id of RecordSelId _ -> True -- Includes dictionary selectors PrimOpId _ -> True diff --git a/ghc/compiler/coreSyn/CoreTidy.lhs b/ghc/compiler/coreSyn/CoreTidy.lhs index 57665fd..1e4ac02 100644 --- a/ghc/compiler/coreSyn/CoreTidy.lhs +++ b/ghc/compiler/coreSyn/CoreTidy.lhs @@ -21,7 +21,7 @@ import VarEnv import VarSet import Var ( Id, Var ) import Id ( idType, idInfo, idName, isExportedId, - idCafInfo, mkId, isLocalId, omitIfaceSigForId, + idCafInfo, mkId, isLocalId, isImplicitId, idFlavour, modifyIdInfo ) import IdInfo {- loads of stuff -} @@ -314,8 +314,8 @@ tidyTopBinder :: Module -> IdEnv Bool tidyTopBinder mod ext_ids tidy_env rhs caf_info env@(us, orig_env2, occ_env2, subst_env2) id - | omitIfaceSigForId id -- Don't mess with constructors, - = (env, id) -- record selectors, and the like + | isImplicitId id -- Don't mess with constructors, + = (env, id) -- record selectors, and the like | otherwise -- This function is the heart of Step 2 diff --git a/ghc/compiler/main/MkIface.lhs b/ghc/compiler/main/MkIface.lhs index e43429c..2521b4d 100644 --- a/ghc/compiler/main/MkIface.lhs +++ b/ghc/compiler/main/MkIface.lhs @@ -29,7 +29,7 @@ import HscTypes ( VersionInfo(..), ModIface(..), ModDetails(..), ) import CmdLineOpts -import Id ( Id, idType, idInfo, omitIfaceSigForId, isDictFunId, +import Id ( Id, idType, idInfo, isImplicitId, isDictFunId, idSpecialisation, setIdInfo, isLocalId, idName, hasNoBinding ) import Var ( isId ) @@ -261,8 +261,8 @@ ifaceTyCls (ATyCon tycon) so_far = ([getName field_label], mk_bang_ty strict_mark (fieldLabelType field_label)) ifaceTyCls (AnId id) so_far - | omitIfaceSigForId id = so_far - | otherwise = iface_sig : so_far + | isImplicitId id = so_far + | otherwise = iface_sig : so_far where iface_sig = IfaceSig { tcdName = getName id, tcdType = toHsType id_type,