#include "HsVersions.h"
-import Module ( ModuleName, mkPrelModule, mkModuleName )
-import OccName ( NameSpace, UserFS, varName, dataName, tcName, clsName, mkKindOccFS )
+import Module ( ModuleName, mkPrelModule, mkHomeModule, mkModuleName )
+import OccName ( NameSpace, UserFS, varName, dataName, tcName, clsName,
+ mkKindOccFS, mkOccFS
+ )
import RdrName ( RdrName, mkOrig, mkUnqual )
import UniqFM
import Unique ( Unique, Uniquable(..), hasKey,
import UniqFM ( UniqFM, listToUFM )
import Name ( Name, mkLocalName, mkKnownKeyGlobal, nameRdrName )
import RdrName ( rdrNameOcc )
-import SrcLoc ( builtinSrcLoc )
+import SrcLoc ( builtinSrcLoc, noSrcLoc )
import Util ( nOfThem )
import Panic ( panic )
\end{code}
%************************************************************************
%* *
+\subsection{Local Names}
+%* *
+%************************************************************************
+
+This *local* name is used by the interactive stuff
+
+\begin{code}
+itName uniq = mkLocalName uniq (mkOccFS varName SLIT("it")) noSrcLoc
+\end{code}
+
+\begin{code}
+-- mkUnboundName makes a place-holder Name; it shouldn't be looked at except possibly
+-- during compiler debugging.
+mkUnboundName :: RdrName -> Name
+mkUnboundName rdr_name = mkLocalName unboundKey (rdrNameOcc rdr_name) builtinSrcLoc
+
+isUnboundName :: Name -> Bool
+isUnboundName name = name `hasKey` unboundKey
+\end{code}
+
+
+%************************************************************************
+%* *
\subsection{Known key Names}
%* *
%************************************************************************
newStablePtrName,
bindIOName,
returnIOName,
+ failIOName,
-- Strings and lists
mapName,
word64TyConName,
-- Others
+ unsafeCoerceName,
otherwiseIdName,
plusIntegerName,
timesIntegerName,
pREL_NUM = mkPrelModule pREL_NUM_Name
pREL_REAL = mkPrelModule pREL_REAL_Name
pREL_FLOAT = mkPrelModule pREL_FLOAT_Name
+
+iNTERACTIVE = mkHomeModule (mkModuleName "$Interactive")
\end{code}
%************************************************************************
genUnitDataConName = dataQual pREL_BASE_Name SLIT("Unit") genUnitDataConKey
-- Random PrelBase functions
+unsafeCoerceName = varQual pREL_BASE_Name SLIT("unsafeCoerce") unsafeCoerceIdKey
otherwiseIdName = varQual pREL_BASE_Name SLIT("otherwise") otherwiseIdKey
appendName = varQual pREL_BASE_Name SLIT("++") appendIdKey
foldrName = varQual pREL_BASE_Name SLIT("foldr") foldrIdKey
ioDataConName = dataQual pREL_IO_BASE_Name SLIT("IO") ioDataConKey
bindIOName = varQual pREL_IO_BASE_Name SLIT("bindIO") bindIOIdKey
returnIOName = varQual pREL_IO_BASE_Name SLIT("returnIO") returnIOIdKey
+failIOName = varQual pREL_IO_BASE_Name SLIT("failIO") failIOIdKey
-- IO things
printName = varQual pREL_IO_Name SLIT("print") printIdKey
plusIntegerIdKey = mkPreludeMiscIdUnique 41
timesIntegerIdKey = mkPreludeMiscIdUnique 42
printIdKey = mkPreludeMiscIdUnique 43
+failIOIdKey = mkPreludeMiscIdUnique 44
\end{code}
Certain class operations from Prelude classes. They get their own
= cCallishClassKeys
\end{code}
-\begin{code}
--- mkUnboundName makes a place-holder Name; it shouldn't be looked at except possibly
--- during compiler debugging.
-mkUnboundName :: RdrName -> Name
-mkUnboundName rdr_name = mkLocalName unboundKey (rdrNameOcc rdr_name) builtinSrcLoc
-
-isUnboundName :: Name -> Bool
-isUnboundName name = name `hasKey` unboundKey
-\end{code}