-\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}
-
-
-%************************************************************************
-%* *