From 163efd68fae4e23a2d4182839d776da04c363153 Mon Sep 17 00:00:00 2001 From: Roman Leshchinskiy Date: Wed, 18 Jul 2007 04:55:53 +0000 Subject: [PATCH] Refactoring --- compiler/vectorise/VectType.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/vectorise/VectType.hs b/compiler/vectorise/VectType.hs index 15b2a5b..dfebe18 100644 --- a/compiler/vectorise/VectType.hs +++ b/compiler/vectorise/VectType.hs @@ -77,8 +77,8 @@ vectTypeEnv env zipWithM_ defTyCon keep_tcs keep_tcs zipWithM_ defDataCon keep_dcs keep_dcs vect_tcs <- vectTyConDecls conv_tcs - parr_tcs1 <- mapM (\tc -> buildPArrayTyCon (tyConName tc) tc) keep_tcs - parr_tcs2 <- zipWithM (buildPArrayTyCon . tyConName) conv_tcs vect_tcs + parr_tcs1 <- zipWithM buildPArrayTyCon keep_tcs keep_tcs + parr_tcs2 <- zipWithM buildPArrayTyCon conv_tcs vect_tcs let new_tcs = vect_tcs ++ parr_tcs1 ++ parr_tcs2 let new_env = extendTypeEnvList env @@ -173,8 +173,8 @@ vectDataCon dc rep_arg_tys = dataConRepArgTys dc tycon = dataConTyCon dc -buildPArrayTyCon :: Name -> TyCon -> VM TyCon -buildPArrayTyCon orig_name vect_tc = fixV $ \repr_tc -> +buildPArrayTyCon :: TyCon -> TyCon -> VM TyCon +buildPArrayTyCon orig_tc vect_tc = fixV $ \repr_tc -> do name' <- cloneName mkPArrayTyConOcc orig_name parent <- buildPArrayParentInfo orig_name vect_tc repr_tc @@ -191,6 +191,7 @@ buildPArrayTyCon orig_name vect_tc = fixV $ \repr_tc -> False -- FIXME: no generics False -- not GADT syntax where + orig_name = tyConName orig_tc name = tyConName vect_tc kind = tyConKind vect_tc tyvars = tyConTyVars vect_tc -- 1.7.10.4