Commit 0dbe3f27 authored by simonpj's avatar simonpj

[project @ 2000-12-08 12:01:44 by simonpj]

Rename omitIfaceSigForId to isImplicitId
parent 056e4c1f
......@@ -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
......
......@@ -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
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment