[project @ 2005-01-31 13:22:57 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcType.lhs
index c119938..1c330cb 100644 (file)
@@ -22,7 +22,7 @@ module TcType (
 
   --------------------------------
   -- MetaDetails
-  TcTyVarDetails(..),
+  Expected(..), TcRef, TcTyVarDetails(..),
   MetaDetails(Flexi, Indirect), SkolemInfo(..), pprSkolemTyVar,
   isImmutableTyVar, isSkolemTyVar, isMetaTyVar, isExistentialTyVar, skolemTvInfo, metaTvRef,
   isFlexi, isIndirect,
@@ -94,7 +94,7 @@ module TcType (
   -- Type substitutions
   TvSubst(..),         -- Representation visible to a few friends
   TvSubstEnv, emptyTvSubst,
-  mkTvSubst, zipTvSubst, zipTopTvSubst, mkTopTvSubst,
+  mkOpenTvSubst, zipOpenTvSubst, zipTopTvSubst, mkTopTvSubst,
   getTvSubstEnv, setTvSubstEnv, getTvInScope, extendTvInScope,
   extendTvSubst, extendTvSubstList, isInScope,
   substTy, substTys, substTyWith, substTheta, substTyVar, substTyVarBndr,
@@ -146,7 +146,7 @@ import Type         (       -- Re-exports
 
                          TvSubst(..),
                          TvSubstEnv, emptyTvSubst,
-                         mkTvSubst, zipTvSubst, zipTopTvSubst, mkTopTvSubst,
+                         mkOpenTvSubst, zipOpenTvSubst, zipTopTvSubst, mkTopTvSubst,
                          getTvSubstEnv, setTvSubstEnv, getTvInScope, extendTvInScope,
                          extendTvSubst, extendTvSubstList, isInScope,
                          substTy, substTys, substTyWith, substTheta, substTyVar, substTyVarBndr,
@@ -228,6 +228,10 @@ type TcRhoType      = TcType
 type TcTauType      = TcType
 type TcKind         = Kind
 type TcTyVarSet     = TyVarSet
+
+type TcRef a    = IORef a
+data Expected ty = Infer (TcRef ty)    -- The hole to fill in for type inference
+                | Check ty             -- The type to check during type checking
 \end{code}