X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcBinds.lhs;h=7890091ff1e90628a8dd181bfef8cd4464c2f5fe;hb=f5015ef7702e7bad9e34188cc5f76e6891730b3d;hp=2cfb1b2bcb63d589857c508472e81b4d204d3f4c;hpb=029c4588e6e022aa15e465cc67082378d4ee2bea;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs index 2cfb1b2..7890091 100644 --- a/compiler/typecheck/TcBinds.lhs +++ b/compiler/typecheck/TcBinds.lhs @@ -31,8 +31,7 @@ import Coercion import VarEnv import TysPrim import Id -import IdInfo -import Var hiding (mkLocalId) +import Var import Name import NameSet import NameEnv @@ -103,7 +102,7 @@ tcHsBootSigs (ValBindsOut binds sigs) where tc_boot_sig (TypeSig (L _ name) ty) = do { sigma_ty <- tcHsSigType (FunSigCtxt name) ty - ; return (mkVanillaGlobal name sigma_ty vanillaIdInfo) } + ; return (mkVanillaGlobal name sigma_ty) } -- Notice that we make GlobalIds, not LocalIds tc_boot_sig s = pprPanic "tcHsBootSigs/tc_boot_sig" (ppr s) tcHsBootSigs groups = pprPanic "tcHsBootSigs" (ppr groups) @@ -218,7 +217,7 @@ tc_group poly_rec top_lvl sig_fn prag_fn (Recursive, binds) thing_inside -- group at once; an earlier one may use a later one! do { traceTc (text "tc_group rec" <+> pprLHsBinds binds) ; (binds1,thing) <- bindLocalInsts top_lvl $ - go (stronglyConnComp (mkEdges sig_fn binds)) + go (stronglyConnCompFromEdgedVertices (mkEdges sig_fn binds)) ; return ([(Recursive, unionManyBags binds1)], thing) } -- Rec them all together where @@ -630,14 +629,14 @@ tcLhs sig_fn (FunBind { fun_id = L nm_loc name, fun_infix = inf, fun_matches = m tcLhs sig_fn (PatBind { pat_lhs = pat, pat_rhs = grhss }) = do { mb_sigs <- mapM (tcInstSig_maybe sig_fn) names ; mono_pat_binds <- doptM Opt_MonoPatBinds - -- With -fmono-pat-binds, we do no generalisation of pattern bindings + -- With -XMonoPatBinds, we do no generalisation of pattern bindings -- But the signature can still be polymoprhic! -- data T = MkT (forall a. a->a) -- x :: forall a. a->a -- MkT x = -- The function get_sig_ty decides whether the pattern-bound variables - -- should have exactly the type in the type signature (-fmono-pat-binds), - -- or the instantiated version (-fmono-pat-binds) + -- should have exactly the type in the type signature (-XMonoPatBinds), + -- or the instantiated version (-XMonoPatBinds) ; let nm_sig_prs = names `zip` mb_sigs get_sig_ty | mono_pat_binds = idType . sig_id @@ -860,7 +859,6 @@ checkDistinctTyVars sig_tvs <+> ptext (sLit "is unified with another quantified type variable") <+> quotes (ppr tidy_tv2) ; failWithTcM (env2, msg) } - where \end{code}