Computations in the vectorisation monad concerned with naming and fresh variable generation.
- cloneName :: (OccName -> OccName) -> Name -> VM Name
- cloneId :: (OccName -> OccName) -> 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
Documentation
cloneName :: (OccName -> OccName) -> Name -> VM NameSource
Clone a name, using the provide function to transform its OccName
.
newExportedVar :: OccName -> Type -> VM VarSource
Make a fresh exported variable with the given type.
newLocalVar :: FastString -> Type -> VM VarSource
Make a fresh local variable with the given type. The variable's name is formed using the given string as the prefix.
newLocalVars :: FastString -> [Type] -> VM [Var]Source
Make several fresh local varaiables with the given types. The variable's names are formed using the given string as the prefix.
newDummyVar :: Type -> VM VarSource
Make a new local dummy variable.