X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcBinds.lhs;h=07a0a942f331882342483e1d31ebbda3045b45ce;hb=37863eec8d97fc12d2ccb47d5eaf531ed0dff9ab;hp=446f198b3190a1da09f08a86a8a2f5f523fe3a4d;hpb=38ef36af81c7fe05f12ead2bb3613cff208d81fe;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcBinds.lhs b/ghc/compiler/typecheck/TcBinds.lhs index 446f198..07a0a94 100644 --- a/ghc/compiler/typecheck/TcBinds.lhs +++ b/ghc/compiler/typecheck/TcBinds.lhs @@ -26,7 +26,7 @@ import TcEnv ( tcExtendLocalValEnv, tcExtendLocalValEnv2, newLocalName ) import TcUnify ( Expected(..), newHole, unifyTauTyLists, checkSigTyVarsWrt, sigCtxt ) import TcSimplify ( tcSimplifyInfer, tcSimplifyInferCheck, tcSimplifyRestricted, tcSimplifyToDicts, tcSimplifyIPs ) -import TcMonoType ( tcHsSigType, UserTypeCtxt(..), TcSigInfo(..), +import TcHsType ( tcHsSigType, UserTypeCtxt(..), TcSigInfo(..), tcTySig, maybeSig, tcSigPolyId, tcSigMonoId, tcAddScopedTyVars ) import TcPat ( tcPat, tcSubPat, tcMonoPatBndr ) @@ -221,12 +221,11 @@ so all the clever stuff is in here. as the Name in the tc_ty_sig \begin{code} -tcBindWithSigs - :: TopLevelFlag - -> RenamedMonoBinds - -> [RenamedSig] -- Used solely to get INLINE, NOINLINE sigs - -> RecFlag - -> TcM (TcMonoBinds, [TcId]) +tcBindWithSigs :: TopLevelFlag + -> RenamedMonoBinds + -> [RenamedSig] + -> RecFlag + -> TcM (TcMonoBinds, [TcId]) tcBindWithSigs top_lvl mbind sigs is_rec = -- TYPECHECK THE SIGNATURES @@ -253,6 +252,8 @@ tcBindWithSigs top_lvl mbind sigs is_rec ) $ -- TYPECHECK THE BINDINGS + traceTc (ptext SLIT("--------------------------------------------------------")) `thenM_` + traceTc (ptext SLIT("Bindings for") <+> ppr (collectMonoBinders mbind)) `thenM_` getLIE (tcMonoBinds mbind tc_ty_sigs is_rec) `thenM` \ ((mbind', bndr_names_w_ids), lie_req) -> let (binder_names, mono_ids) = unzip (bagToList bndr_names_w_ids) @@ -543,7 +544,7 @@ checkSigsTyVars qtvs sigs where check_one (TySigInfo id sig_tyvars sig_theta sig_tau _ _ src_loc) = addSrcLoc src_loc $ - addErrCtxt (ptext SLIT("When checking the type signature for") + addErrCtxt (ptext SLIT("In the type signature for") <+> quotes (ppr id)) $ addErrCtxtM (sigCtxt id sig_tyvars sig_theta sig_tau) $ checkSigTyVarsWrt (idFreeTyVars id) sig_tyvars @@ -820,7 +821,6 @@ tcSpecSigs (other_sig : sigs) = tcSpecSigs sigs tcSpecSigs [] = returnM EmptyMonoBinds \end{code} - %************************************************************************ %* * \subsection[TcBinds-errors]{Error contexts and messages}