From: Roman Leshchinskiy Date: Tue, 10 Jul 2007 04:25:02 +0000 (+0000) Subject: Vectorisation of type abstractions X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f2e0a6b983e5a3d01c3a2621eae6ec119038b56a;p=ghc-hetmet.git Vectorisation of type abstractions --- diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs index 71514e1..0358aca 100644 --- a/compiler/vectorise/Vectorise.hs +++ b/compiler/vectorise/Vectorise.hs @@ -345,6 +345,18 @@ vectExpr lc (_, AnnLet (AnnRec prs) body) (vrhss, lrhss) <- mapAndUnzipM (vectExpr lc) rhss (vbody, lbody) <- vectExpr lc body return (vrhss, vbody, lrhss, lbody) +vectExpr lc (_, AnnLam bndr body) + | isTyVar bndr + = do + pa_ty <- paArgType' (TyVarTy bndr) (tyVarKind bndr) + pa_var <- newLocalVar FSLIT("dPA") pa_ty + (vbody, lbody) <- localV + $ do + extendTyVarPA bndr (Var pa_var) + -- FIXME: what about shadowing here (bndr in lc)? + vectExpr lc body + return (mkLams [bndr, pa_var] vbody, + mkLams [bndr, pa_var] lbody) -- ---------------------------------------------------------------------------- -- PA dictionaries