[project @ 2004-05-25 08:09:37 by simonpj]
[ghc-hetmet.git] / ghc / compiler / rename / RnTypes.lhs
index c5c541b..a793284 100644 (file)
@@ -4,7 +4,7 @@
 \section[RnSource]{Main pass of renamer}
 
 \begin{code}
-module RnTypes ( rnHsType, rnLHsType, rnContext,
+module RnTypes ( rnHsType, rnLHsType, rnLHsTypes, rnContext,
                 rnHsSigType, rnHsTypeFVs,
                 rnLPat, rnPat, rnPatsAndThen,          -- Here because it's not part 
                 rnLit, rnOverLit,                      -- of any mutual recursion      
@@ -16,7 +16,7 @@ import CmdLineOpts    ( DynFlag(Opt_WarnUnusedMatches, Opt_GlasgowExts) )
 import HsSyn
 import RdrHsSyn                ( extractHsRhoRdrTyVars )
 import RnHsSyn         ( extractHsTyNames, parrTyCon_name, tupleTyCon_name, 
-                         listTyCon_name, charTyCon_name
+                         listTyCon_name
                        )
 import RnEnv           ( lookupOccRn, lookupBndrRn, lookupSyntaxName,
                          lookupLocatedOccRn, lookupLocatedBndrRn,
@@ -25,15 +25,12 @@ import RnEnv                ( lookupOccRn, lookupBndrRn, lookupSyntaxName,
                          newIPNameRn, bindPatSigTyVarsFV, bindLocatedLocalsFV )
 import TcRnMonad
 import RdrName         ( RdrName, elemLocalRdrEnv )
-import PrelNames       ( eqStringName, eqClassName, integralClassName, 
+import PrelNames       ( eqClassName, integralClassName, 
                          negateName, minusName, lengthPName, indexPName,
                          plusIntegerName, fromIntegerName, timesIntegerName,
                          ratioDataConName, fromRationalName )
 import Constants       ( mAX_TUPLE_SIZE )
-import TysWiredIn      ( intTyCon )
-import TysPrim         ( charPrimTyCon, addrPrimTyCon, intPrimTyCon, 
-                         floatPrimTyCon, doublePrimTyCon )
-import Name            ( Name, NamedThing(..) )
+import Name            ( Name )
 import SrcLoc          ( Located(..), unLoc )
 import NameSet
 
@@ -164,7 +161,7 @@ rnHsType doc (HsAppTy ty1 ty2)
     returnM (HsAppTy ty1' ty2')
 
 rnHsType doc (HsPredTy pred)
-  = rnLPred doc pred   `thenM` \ pred' ->
+  = rnPred doc pred    `thenM` \ pred' ->
     returnM (HsPredTy pred')
 
 rnLHsTypes doc tys = mappM (rnLHsType doc) tys
@@ -177,7 +174,7 @@ rnForAll :: SDoc -> HsExplicitForAll -> [LHsTyVarBndr RdrName] -> LHsContext Rdr
 
 rnForAll doc exp [] (L _ []) (L _ ty) = rnHsType doc ty
        -- One reason for this case is that a type like Int#
-       -- starts of as (HsForAllTy Nothing [] Int), in case
+       -- starts off as (HsForAllTy Nothing [] Int), in case
        -- there is some quantification.  Now that we have quantified
        -- and discovered there are no type variables, it's nicer to turn
        -- it into plain Int.  If it were Int# instead of Int, we'd actually