X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fvectorise%2FVectMonad.hs;h=1bd450e237331ced4cade4dc7f226569ea933597;hb=51ad52d4f7d259b500543404f419ff62456e2097;hp=738ae6ffb499cecd14d9b3939f6e7b65cb22a4e1;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectMonad.hs b/compiler/vectorise/VectMonad.hs index 738ae6f..1bd450e 100644 --- a/compiler/vectorise/VectMonad.hs +++ b/compiler/vectorise/VectMonad.hs @@ -2,7 +2,7 @@ -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module VectMonad ( @@ -11,7 +11,7 @@ module VectMonad ( noV, tryV, maybeV, traceMaybeV, orElseV, fixV, localV, closedV, initV, liftDs, - cloneName, cloneId, + cloneName, cloneId, cloneVar, newExportedVar, newLocalVar, newDummyVar, newTyVar, Builtins(..), sumTyCon, prodTyCon, @@ -141,7 +141,7 @@ initGlobalEnv info instEnvs famInstEnvs , global_tycons = mapNameEnv snd $ vectInfoTyCon info , global_datacons = mapNameEnv snd $ vectInfoDataCon info , global_pa_funs = mapNameEnv snd $ vectInfoPADFun info - , global_pr_funs = emptyVarEnv + , global_pr_funs = emptyNameEnv , global_inst_env = instEnvs , global_fam_inst_env = famInstEnvs , global_bindings = [] @@ -301,6 +301,9 @@ cloneId mk_occ id ty | otherwise = Id.mkLocalId name ty return id' +cloneVar :: Var -> VM Var +cloneVar var = liftM (setIdUnique var) (liftDs newUnique) + newExportedVar :: OccName -> Type -> VM Var newExportedVar occ_name ty = do