X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fvectorise%2FVectMonad.hs;h=1bd450e237331ced4cade4dc7f226569ea933597;hb=51ad52d4f7d259b500543404f419ff62456e2097;hp=5435fbe644060647a919842ebb1e20c07cd01499;hpb=17b297d97d327620ed6bfab942f8992b2446f1bf;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectMonad.hs b/compiler/vectorise/VectMonad.hs index 5435fbe..1bd450e 100644 --- a/compiler/vectorise/VectMonad.hs +++ b/compiler/vectorise/VectMonad.hs @@ -1,8 +1,8 @@ -{-# OPTIONS_GHC -w #-} +{-# OPTIONS -w #-} -- 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/WorkingConventions#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