- parrayTyCon <- dsLookupTyCon parrayTyConName
- paTyCon <- dsLookupTyCon paTyConName
- closureTyCon <- dsLookupTyCon closureTyConName
-
- mkClosureVar <- dsLookupGlobalId mkClosureName
- applyClosureVar <- dsLookupGlobalId applyClosureName
- mkClosurePVar <- dsLookupGlobalId mkClosurePName
- applyClosurePVar <- dsLookupGlobalId applyClosurePName
- closurePAVar <- dsLookupGlobalId closurePAName
- lengthPAVar <- dsLookupGlobalId lengthPAName
- replicatePAVar <- dsLookupGlobalId replicatePAName
-
- return $ Builtins {
- parrayTyCon = parrayTyCon
- , paTyCon = paTyCon
- , closureTyCon = closureTyCon
- , mkClosureVar = mkClosureVar
- , applyClosureVar = applyClosureVar
- , mkClosurePVar = mkClosurePVar
- , applyClosurePVar = applyClosurePVar
- , closurePAVar = closurePAVar
- , lengthPAVar = lengthPAVar
- , replicatePAVar = replicatePAVar
- }
-
-data VEnv = VEnv {
- -- Mapping from variables to their vectorised versions. Mapping
- -- to expressions instead of just Vars gives us more freedom.
- --
- vect_vars :: VarEnv CoreExpr
-
- -- Exported variables which have a vectorised version
- --
- , vect_exported_vars :: VarEnv (Var, Var)
-
- -- Mapping from TyCons to their vectorised versions.
- -- TyCons which do not have to be vectorised are mapped to
- -- themselves.
- , vect_tycons :: NameEnv TyCon
- }
-
-initVEnv :: VectInfo -> DsM VEnv
-initVEnv info
- = return $ VEnv {
- vect_vars = mapVarEnv (Var . snd) $ vectInfoCCVar info
- , vect_exported_vars = emptyVarEnv
- , vect_tycons = mapNameEnv snd $ vectInfoCCTyCon info
- }
-
--- FIXME
-updVectInfo :: VEnv -> ModGuts -> ModGuts
-updVectInfo env guts = guts { mg_vect_info = info' }