ghc-7.0.3: The GHC API

Vectorise.Monad.Naming

Description

Computations in the vectorisation monad concerned with naming and fresh variable generation.

Synopsis

Documentation

cloneName :: (OccName -> OccName) -> Name -> VM NameSource

Clone a name, using the provide function to transform its OccName.

cloneId :: (OccName -> OccName) -> Id -> Type -> VM IdSource

Clone an Id, using the provided function to transform its OccName.

cloneVar :: Var -> VM VarSource

Make a fresh instance of this var, with a new unique.

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.

newTyVar :: FastString -> Kind -> VM VarSource

Make a fresh type variable with the given kind. The variable's name is formed using the given string as the prefix.