[project @ 2000-10-16 08:24:18 by simonpj]
[ghc-hetmet.git] / ghc / compiler / basicTypes / Var.lhs
index 793cfc9..89bef36 100644 (file)
@@ -39,14 +39,13 @@ import Name         ( Name, OccName, NamedThing(..),
                          setNameUnique, setNameOcc, nameUnique, 
                          mkSysLocalName, isExternallyVisibleName
                        )
-import BasicTypes      ( Unused )
+import FastTypes
 import Outputable
 
 import IOExts          ( IORef, newIORef, readIORef, writeIORef )
 \end{code}
 
 
-
 %************************************************************************
 %*                                                                     *
 \subsection{The main data type declarations}
@@ -63,7 +62,7 @@ in its @VarDetails@.
 data Var
   = Var {
        varName    :: Name,
-       realUnique :: Int#,             -- Key for fast comparison
+       realUnique :: FastInt,          -- Key for fast comparison
                                        -- Identical to the Unique in the name,
                                        -- cached here for speed
        varType    :: Type,
@@ -173,6 +172,10 @@ newMutTyVar :: Name -> Kind -> IO TyVar
 newMutTyVar name kind = newTyVar name kind False
 
 newSigTyVar :: Name -> Kind -> IO TyVar
+-- Type variables from type signatures are still mutable, because
+-- they may get unified with type variables from other signatures
+-- But they do contain a flag to distinguish them, so we can tell if
+-- we unify them with a non-type-variable.
 newSigTyVar name kind = newTyVar name kind True
 
 newTyVar name kind is_sig