[project @ 2003-10-31 12:57:15 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcType.lhs
index 3a10ed1..6fa5bdc 100644 (file)
@@ -86,7 +86,7 @@ module TcType (
   Kind,        -- Stuff to do with kinds is insensitive to pre/post Tc
   unliftedTypeKind, liftedTypeKind, openTypeKind, mkArrowKind, mkArrowKinds, 
   superBoxity, liftedBoxity, hasMoreBoxityInfo, defaultKind, superKind,
-  isTypeKind, isAnyTypeKind,
+  isTypeKind, isAnyTypeKind, typeCon,
 
   Type, PredType(..), ThetaType, 
   mkForAllTy, mkForAllTys, 
@@ -102,14 +102,15 @@ module TcType (
   tidyTyVarBndr, tidyOpenTyVar, tidyOpenTyVars,
   typeKind, eqKind,
 
-  tyVarsOfType, tyVarsOfTypes, tyVarsOfPred, tyVarsOfTheta
-  ) where
+  tyVarsOfType, tyVarsOfTypes, tyVarsOfPred, tyVarsOfTheta,
 
-#include "HsVersions.h"
+  pprKind, pprParendKind,
+  pprType, pprParendType,
+  pprPred, pprTheta, pprThetaArrow, pprClassPred
 
+  ) where
 
-import {-# SOURCE #-} PprType( pprType )
--- PprType imports TcType so that it can print intelligently
+#include "HsVersions.h"
 
 -- friends:
 import TypeRep         ( Type(..), TyNote(..), funTyCon )  -- friend
@@ -117,11 +118,11 @@ import TypeRep            ( Type(..), TyNote(..), funTyCon )  -- friend
 import Type            (       -- Re-exports
                          tyVarsOfType, tyVarsOfTypes, tyVarsOfPred,
                          tyVarsOfTheta, Kind, Type, PredType(..),
-                         ThetaType, unliftedTypeKind,
+                         ThetaType, unliftedTypeKind, typeCon,
                          liftedTypeKind, openTypeKind, mkArrowKind,
                          mkArrowKinds, mkForAllTy, mkForAllTys,
                          defaultKind, isTypeKind, isAnyTypeKind,
-                         mkFunTy, mkFunTys, zipFunTys, isTyVarTy,
+                         mkFunTy, mkFunTys, zipFunTys, 
                          mkTyConApp, mkGenTyConApp, mkAppTy,
                          mkAppTys, mkSynTy, applyTy, applyTys,
                          mkTyVarTy, mkTyVarTys, mkTyConTy, mkPredTy,
@@ -133,7 +134,10 @@ import Type                (       -- Re-exports
                          tidyTyVarBndr, tidyOpenTyVar,
                          tidyOpenTyVars, eqKind, 
                          hasMoreBoxityInfo, liftedBoxity,
-                         superBoxity, typeKind, superKind, repType
+                         superBoxity, typeKind, superKind, repType,
+                         pprKind, pprParendKind,
+                         pprType, pprParendType,
+                         pprPred, pprTheta, pprThetaArrow, pprClassPred
                        )
 import TyCon           ( TyCon, isUnLiftedTyCon, tyConUnique )
 import Class           ( Class )
@@ -241,6 +245,10 @@ data TyVarDetails
 
    | InstTv    -- Ditto, but instance decl
 
+   | PatSigTv  -- Scoped type variable, introduced by a pattern
+               -- type signature
+               --      \ x::a -> e
+
    | VanillaTv -- Everything else
 
 isUserTyVar :: TcTyVar -> Bool -- Avoid unifying these if possible
@@ -266,6 +274,7 @@ tyVarBindingInfo tv
     details SigTv     = ptext SLIT("type signature")
     details ClsTv     = ptext SLIT("class declaration")
     details InstTv    = ptext SLIT("instance declaration")
+    details PatSigTv  = ptext SLIT("pattern type signature")
     details VanillaTv = ptext SLIT("//vanilla//")      -- Ditto
 \end{code}