X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcHsSyn.lhs;h=bfec766e20b9bbe4fb003c8b6442864d5ecdd173;hb=7121d8296720cf1a79259350f361f5771210b23d;hp=6389f34aef514141f3ed2cd107bb75e802807779;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcHsSyn.lhs b/compiler/typecheck/TcHsSyn.lhs index 6389f34..bfec766 100644 --- a/compiler/typecheck/TcHsSyn.lhs +++ b/compiler/typecheck/TcHsSyn.lhs @@ -301,6 +301,7 @@ zonk_bind env (AbsBinds { abs_tvs = tyvars, abs_dicts = dicts, abs_exports = new_exports, abs_binds = new_val_bind }) where zonkExport env (tyvars, global, local, prags) + -- The tyvars are already zonked = zonkIdBndr env global `thenM` \ new_global -> mapM zonk_prag prags `thenM` \ new_prags -> returnM (tyvars, new_global, zonkIdOcc env local, new_prags) @@ -776,6 +777,14 @@ zonk_pat env (DictPat ds ms) ; ms' <- zonkIdBndrs env ms ; return (extendZonkEnv env (ds' ++ ms'), DictPat ds' ms') } +zonk_pat env (CoPat co_fn pat ty) + = do { (env', co_fn') <- zonkCoFn env co_fn + ; (env'', pat') <- zonkPat env' (noLoc pat) + ; ty' <- zonkTcTypeToType env'' ty + ; return (env'', CoPat co_fn' (unLoc pat') ty') } + +zonk_pat env pat = pprPanic "zonk_pat" (ppr pat) + --------------------------- zonkConStuff env (PrefixCon pats) = do { (env', pats') <- zonkPats env pats @@ -811,8 +820,8 @@ zonkForeignExports :: ZonkEnv -> [LForeignDecl TcId] -> TcM [LForeignDecl Id] zonkForeignExports env ls = mappM (wrapLocM (zonkForeignExport env)) ls zonkForeignExport :: ZonkEnv -> ForeignDecl TcId -> TcM (ForeignDecl Id) -zonkForeignExport env (ForeignExport i hs_ty spec isDeprec) = - returnM (ForeignExport (fmap (zonkIdOcc env) i) undefined spec isDeprec) +zonkForeignExport env (ForeignExport i hs_ty spec) = + returnM (ForeignExport (fmap (zonkIdOcc env) i) undefined spec) zonkForeignExport env for_imp = returnM for_imp -- Foreign imports don't need zonking \end{code} @@ -952,7 +961,7 @@ mkArbitraryType tv | otherwise = pprTrace "Urk! Inventing strangely-kinded void TyCon:" (ppr tc_name $$ ppr kind) $ - mkPrimTyCon tc_name kind 0 [] VoidRep + mkPrimTyCon tc_name kind 0 VoidRep -- Same name as the tyvar, apart from making it start with a colon (sigh) -- I dread to think what will happen if this gets out into an -- interface file. Catastrophe likely. Major sigh.