X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcModule.lhs;h=3d58d8e3a9ab8c337dd0cc937601c1fcbce86919;hb=b54a8c67cfe6c59bd4dfa17d3ca15cca0ff85856;hp=3bd6902b408dc06f9313bf107ff28282823d819a;hpb=68b648e72dde323b9c33442155948d551dd3c9f0;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcModule.lhs b/ghc/compiler/typecheck/TcModule.lhs index 3bd6902..3d58d8e 100644 --- a/ghc/compiler/typecheck/TcModule.lhs +++ b/ghc/compiler/typecheck/TcModule.lhs @@ -43,7 +43,7 @@ import TcTyClsDecls ( tcTyAndClassDecls ) import CoreUnfold ( unfoldingTemplate, hasUnfolding ) import Type ( funResultTy, splitForAllTys, openTypeKind ) import Bag ( isEmptyBag ) -import ErrUtils ( printErrorsAndWarnings, dumpIfSet_dyn, showPass ) +import ErrUtils ( printErrorsAndWarnings, errorsFound, dumpIfSet_dyn, showPass ) import Id ( idType, idUnfolding ) import Module ( Module ) import Name ( Name, toRdrName ) @@ -51,7 +51,6 @@ import Name ( nameEnvElts, lookupNameEnv ) import TyCon ( tyConGenInfo ) import Util import BasicTypes ( EP(..), Fixity ) -import Bag ( isEmptyBag ) import Outputable import HscTypes ( PersistentCompilerState(..), HomeSymbolTable, PackageTypeEnv, ModIface(..), @@ -141,14 +140,14 @@ typecheck dflags pcs hst unqual thing_inside = do { showPass dflags "Typechecker"; ; env <- initTcEnv hst (pcs_PTE pcs) - ; (maybe_tc_result, (warns,errs)) <- initTc dflags env thing_inside + ; (maybe_tc_result, errs) <- initTc dflags env thing_inside - ; printErrorsAndWarnings unqual (errs,warns) + ; printErrorsAndWarnings unqual errs - ; if isEmptyBag errs then - return maybe_tc_result - else + ; if errorsFound errs then return Nothing + else + return maybe_tc_result } \end{code}