Computations in the vectorisation monad concerned with naming and fresh variable generation.
- mkLocalisedName :: (Maybe String -> OccName -> OccName) -> Name -> VM Name
- mkDerivedName :: (OccName -> OccName) -> Name -> VM Name
- mkVectId :: Id -> Type -> VM Id
- cloneVar :: Var -> VM Var
- newExportedVar :: OccName -> Type -> VM Var
- newLocalVar :: FastString -> Type -> VM Var
- newLocalVars :: FastString -> [Type] -> VM [Var]
- newDummyVar :: Type -> VM Var
- newTyVar :: FastString -> Kind -> VM Var
Produce the vectorised variant of an
Id with the given vectorised type, while taking care that
vectorised dfun ids must be dfuns again.
Force the new name to be a system name and, if the original was an external name, disambiguate the new name with the module name of the original.
Make a fresh exported variable with the given type.
Make a fresh local variable with the given type. The variable's name is formed using the given string as the prefix.
Make several fresh local variables with the given types. The variable's names are formed using the given string as the prefix.