X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcEnv.lhs;h=a23795cf6d3975b0546b4df357df73ec3959a8a4;hb=640872cbcc1c56b5c80cc9b8635ffca851a0cea8;hp=4c87a12671f75fd9b35e31a4de4aa6aec1171776;hpb=6a05ec5ef5373f61b7f9f5bdc344483417fa801b;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcEnv.lhs b/compiler/typecheck/TcEnv.lhs index 4c87a12..a23795c 100644 --- a/compiler/typecheck/TcEnv.lhs +++ b/compiler/typecheck/TcEnv.lhs @@ -47,7 +47,7 @@ module TcEnv( -- Template Haskell stuff checkWellStaged, spliceOK, bracketOK, tcMetaTy, thLevel, - topIdLvl, + topIdLvl, thTopLevelId, -- New Ids newLocalName, newDFunName, newFamInstTyConName, @@ -604,6 +604,10 @@ tcMetaTy :: Name -> TcM Type tcMetaTy tc_name = tcLookupTyCon tc_name `thenM` \ t -> returnM (mkTyConApp t []) + +thTopLevelId :: Id -> Bool +-- See Note [What is a top-level Id?] in TcSplice +thTopLevelId id = isGlobalId id || isExternalName (idName id) \end{code}