[project @ 2005-02-03 13:11:44 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcRnTypes.lhs
index 5fcd47b..2abdfa5 100644 (file)
@@ -45,7 +45,7 @@ import HsSyn          ( PendingSplice, HsOverLit, LRuleDecl, LForeignDecl,
                          ArithSeqInfo, DictBinds, LHsBinds )
 import HscTypes                ( FixityEnv,
                          HscEnv, TypeEnv, TyThing, 
-                         GenAvailInfo(..), AvailInfo,
+                         GenAvailInfo(..), AvailInfo, HscSource(..),
                          availName, IsBootInterface, Deprecations )
 import Packages                ( PackageId )
 import Type            ( Type, TvSubstEnv, pprParendType )
@@ -129,6 +129,9 @@ data Env gbl lcl    -- Changes as we move into an expression
 data TcGblEnv
   = TcGblEnv {
        tcg_mod     :: Module,          -- Module being compiled
+       tcg_src     :: HscSource,       -- What kind of module 
+                                       -- (regular Haskell, hs-boot, ext-core)
+
        tcg_rdr_env :: GlobalRdrEnv,    -- Top level envt; used during renaming
        tcg_default :: Maybe [Type],    -- Types used for defaulting
                                        -- Nothing => no 'default' decl
@@ -406,9 +409,10 @@ data TcTyThing
                                        --      tycons and clases in this recursive group
 
 instance Outputable TcTyThing where    -- Debugging only
-   ppr (AGlobal g)      = text "AGlobal" <+> ppr g
-   ppr (ATcId g tl pl)  = text "ATcId" <+> ppr g <+> ppr tl <+> ppr pl
-   ppr (ATyVar tv ty)   = text "ATyVar" <+> ppr tv <+> pprParendType ty
+   ppr (AGlobal g)      = ppr g
+   ppr (ATcId g tl pl)  = text "Identifier" <> 
+                         ifPprDebug (brackets (ppr g <> comma <> ppr tl <> comma <> ppr pl))
+   ppr (ATyVar tv ty)   = text "Type variable" <+> quotes (ppr tv) <+> pprParendType ty
    ppr (AThing k)       = text "AThing" <+> ppr k
 \end{code}