Commit 9685c129 authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Add support for name cloning to vectorisation monad

parent 8776493a
......@@ -31,6 +31,7 @@ import Type
import Var
import VarEnv
import Id
import OccName
import Name
import NameEnv
......@@ -240,6 +241,16 @@ getInstEnv = readGEnv global_inst_env
getFamInstEnv :: VM FamInstEnvs
getFamInstEnv = readGEnv global_fam_inst_env
cloneName :: (OccName -> OccName) -> Name -> VM Name
cloneName mk_occ name = liftM make (liftDs newUnique)
where
occ_name = mk_occ (nameOccName name)
make u | isExternalName name = mkExternalName u (nameModule name)
occ_name
(nameSrcSpan name)
| otherwise = mkSystemName u occ_name
newLocalVar :: FastString -> Type -> VM Var
newLocalVar fs ty
= do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment