X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcEnv.lhs;h=31d81a4bd6d6712086978343309dc3e88449dc6e;hb=edf6bdfb5dee21f9bc5077083e5350ee64efffbc;hp=f14eb4274ecb982db54d6f30a7ae70f629057f6b;hpb=356028e7abbf088d7d71d19997a07a79afbd3c8e;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcEnv.lhs b/ghc/compiler/typecheck/TcEnv.lhs index f14eb42..31d81a4 100644 --- a/ghc/compiler/typecheck/TcEnv.lhs +++ b/ghc/compiler/typecheck/TcEnv.lhs @@ -93,9 +93,11 @@ tcLookupLocatedGlobal name = addLocM tcLookupGlobal name tcLookupGlobal :: Name -> TcM TyThing +-- The Name is almost always an ExternalName, but not always +-- In GHCi, we may make command-line bindings (ghci> let x = True) +-- that bind a GlobalId, but with an InternalName tcLookupGlobal name - = ASSERT( isExternalName name ) - do { env <- getGblEnv + = do { env <- getGblEnv -- Try local envt ; case lookupNameEnv (tcg_type_env env) name of {