X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcModule.lhs;h=1f2b513c2c725d47a5f309624b73511bea130606;hb=2f51f1402e6869c0f049ffbe7b019bf6ab80558f;hp=1645d0e358a040d5e297348071f4a6a98e971f97;hpb=7b0181919416d8f04324575b7e17031ca692f5b0;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcModule.lhs b/ghc/compiler/typecheck/TcModule.lhs index 1645d0e..1f2b513 100644 --- a/ghc/compiler/typecheck/TcModule.lhs +++ b/ghc/compiler/typecheck/TcModule.lhs @@ -44,7 +44,7 @@ import PrelInfo ( unitTy, mkPrimIoTy ) import Pretty import RnUtils ( GlobalNameMappers(..), GlobalNameMapper(..) ) import TyCon ( TyCon ) -import Type ( applyTyCon ) +import Type ( mkSynTy ) import Unify ( unifyTauTy ) import UniqFM ( lookupUFM_Directly, lookupWithDefaultUFM_Directly, filterUFM, eltsUFM ) @@ -103,13 +103,13 @@ tcModule renamer_name_funs fixTc ( \ ~(rec_inst_mapper, _, _, _, _, _) -> -- Type-check the type and class decls - trace "tcTyAndClassDecls:" $ + --trace "tcTyAndClassDecls:" $ tcTyAndClassDecls1 rec_inst_mapper ty_decls_bag cls_decls_bag `thenTc` \ (env, record_binds) -> -- Typecheck the instance decls, includes deriving tcSetEnv env ( - trace "tcInstDecls:" $ + --trace "tcInstDecls:" $ tcInstDecls1 inst_decls_bag specinst_sigs mod_name renamer_name_funs fixities ) `thenTc` \ (inst_info, deriv_binds, ddump_deriv) -> @@ -142,7 +142,7 @@ tcModule renamer_name_funs -- Value declarations next. -- We also typecheck any extra binds that came out of the "deriving" process - trace "tcBinds:" $ + --trace "tcBinds:" $ tcBindsAndThen (\ binds1 (binds2, thing) -> (binds1 `ThenBinds` binds2, thing)) (val_decls `ThenBinds` deriv_binds) @@ -233,7 +233,7 @@ checkTopLevelIds mod final_env case (maybe_main, maybe_prim) of (Just main, Nothing) -> tcAddErrCtxt mainCtxt $ - unifyTauTy (applyTyCon io_tc [unitTy]) + unifyTauTy (mkSynTy io_tc [unitTy]) (idType main) (Nothing, Just prim) -> tcAddErrCtxt primCtxt $ @@ -254,7 +254,5 @@ mainBothIdErr sty = ppStr "module Main contains definitions for both main and mainPrimIO" mainNoneIdErr sty - = panic "ToDo: sort out mainIdKey" - -- ppStr "module Main does not contain a definition for main (or mainPrimIO)" - + = ppStr "module Main does not contain a definition for main (or mainPrimIO)" \end{code}