[project @ 2001-08-04 06:11:24 by ken]
[ghc-hetmet.git] / ghc / compiler / prelude / PrelNames.lhs
index cf0d3bf..0f45777 100644 (file)
@@ -22,8 +22,6 @@ module PrelNames (
        knownKeyNames, 
         mkTupNameStr, mkTupConRdrName,
 
-       SyntaxMap, vanillaSyntaxMap, SyntaxList, syntaxList, 
-
        ------------------------------------------------------------
        -- Goups of classes and types
        needsDataDeclCtxtClassKeys, cCallishClassKeys, noDictClassKeys,
@@ -492,8 +490,8 @@ mutableByteArrayTyConName = tcQual pREL_BYTEARR_Name  SLIT("MutableByteArray") m
 -- Forign objects and weak pointers
 foreignObjTyConName   = tcQual   fOREIGNOBJ_Name SLIT("ForeignObj") foreignObjTyConKey
 foreignObjDataConName = dataQual fOREIGNOBJ_Name SLIT("ForeignObj") foreignObjDataConKey
-foreignPtrTyConName   = tcQual   pREL_IO_BASE_Name SLIT("ForeignPtr") foreignPtrTyConKey
-foreignPtrDataConName = dataQual pREL_IO_BASE_Name SLIT("ForeignPtr") foreignPtrDataConKey
+foreignPtrTyConName   = tcQual   pREL_FOREIGN_Name SLIT("ForeignPtr") foreignPtrTyConKey
+foreignPtrDataConName = dataQual pREL_FOREIGN_Name SLIT("ForeignPtr") foreignPtrDataConKey
 stablePtrTyConName    = tcQual   pREL_STABLE_Name SLIT("StablePtr") stablePtrTyConKey
 stablePtrDataConName  = dataQual pREL_STABLE_Name SLIT("StablePtr") stablePtrDataConKey
 deRefStablePtrName    = varQual  pREL_STABLE_Name SLIT("deRefStablePtr") deRefStablePtrIdKey
@@ -811,6 +809,7 @@ irrefutPatErrorIdKey              = mkPreludeMiscIdUnique 15
 eqStringIdKey                = mkPreludeMiscIdUnique 16
 noMethodBindingErrorIdKey     = mkPreludeMiscIdUnique 17
 nonExhaustiveGuardsErrorIdKey = mkPreludeMiscIdUnique 18
+errorCStringIdKey            = mkPreludeMiscIdUnique 19 
 parErrorIdKey                = mkPreludeMiscIdUnique 20
 parIdKey                     = mkPreludeMiscIdUnique 21
 patErrorIdKey                = mkPreludeMiscIdUnique 22
@@ -912,48 +911,6 @@ cCallishTyKeys =
 
 %************************************************************************
 %*                                                                     *
-\subsection{Re-bindable desugaring names}
-%*                                                                     *
-%************************************************************************
-
-Haskell 98 says that when you say "3" you get the "fromInteger" from the
-Standard Prelude, regardless of what is in scope.   However, to experiment
-with having a language that is less coupled to the standard prelude, we're
-trying a non-standard extension that instead gives you whatever "Prelude.fromInteger"
-happens to be in scope.  Then you can
-       import Prelude ()
-       import MyPrelude as Prelude
-to get the desired effect.
-
-The SyntaxNames record gives all the names you can rebind in this way.
-This record of names needs to go through the renamer to map RdrNames to
-Names (i.e. look up the names in the in-scope environment), to suck in
-their type signatures from interface file(s).
-
-\begin{code}
-type SyntaxList = [(Name, RdrName)]
-  -- Maps a Name, which identifies the standard built-in thing
-  -- to a RdrName for the re-mapped version of the built-in thing
-
-syntaxList :: SyntaxList
-syntaxList =[  (fromIntegerName,       mkUnqual varName SLIT("fromInteger"))
-            ,  (fromRationalName,      mkUnqual varName SLIT("fromRational"))
-            ,  (negateName,            mkUnqual varName SLIT("negate"))
-            ,  (minusName,             mkUnqual varName SLIT("-"))
-                       -- For now that's all.  We may add booleans and lists later.
-           ]
-
-
-type SyntaxMap = Name -> Name
-  -- Maps a standard built-in name, such as PrelNum.fromInteger
-  -- to its re-mapped version, such as MyPrelude.fromInteger
-
-vanillaSyntaxMap name = name
-\end{code}
-
-
-%************************************************************************
-%*                                                                     *
 \subsection[Class-std-groups]{Standard groups of Prelude classes}
 %*                                                                     *
 %************************************************************************