TyVar, mkTyVar, mkTcTyVar,
tyVarName, tyVarKind,
setTyVarName, setTyVarUnique,
- tcTyVarRef, tcTyVarDetails,
+ tcTyVarDetails,
-- Ids
Id, DictId,
#include "HsVersions.h"
import {-# SOURCE #-} TypeRep( Type )
-import {-# SOURCE #-} TcType( TyVarDetails )
-import {-# SOURCE #-} IdInfo( GlobalIdDetails, notGlobalId,
- IdInfo, seqIdInfo )
+import {-# SOURCE #-} TcType( TcTyVarDetails )
+import {-# SOURCE #-} IdInfo( GlobalIdDetails, notGlobalId, IdInfo, seqIdInfo )
import Name ( Name, OccName, NamedThing(..),
setNameUnique, setNameOcc, nameUnique
import Unique ( Unique, Uniquable(..), mkUniqueGrimily, getKey# )
import FastTypes
import Outputable
-import DATA_IOREF
\end{code}
tyVarKind :: Kind }
| TcTyVar { -- Used only during type inference
- varName :: !Name, -- Could we get away without a Name?
+ varName :: !Name,
realUnique :: FastInt,
tyVarKind :: Kind,
- tcTyVarRef :: IORef (Maybe Type),
- tcTyVarDetails :: TyVarDetails }
+ tcTyVarDetails :: TcTyVarDetails }
| GlobalId { -- Used for imported Ids, dict selectors etc
varName :: !Name,
| Exported -- Exported
| SpecPragma -- Not exported, but not to be discarded either
-- It's unclean that this is so deeply built in
+ -- Exported and SpecPragma Ids are kept alive;
+ -- NotExported things may be discarded as dead code.
\end{code}
LocalId and GlobalId
, tyVarKind = kind
}
-mkTcTyVar :: Name -> Kind -> TyVarDetails -> IORef (Maybe Type) -> TyVar
-mkTcTyVar name kind details ref
+mkTcTyVar :: Name -> Kind -> TcTyVarDetails -> TyVar
+mkTcTyVar name kind details
= TcTyVar { varName = name,
realUnique = getKey# (nameUnique name),
tyVarKind = kind,
- tcTyVarRef = ref,
tcTyVarDetails = details
}
\end{code}