diff options
author | Roman Leshchinskiy <rl@cse.unsw.edu.au> | 2007-07-18 04:55:53 +0000 |
---|---|---|
committer | Roman Leshchinskiy <rl@cse.unsw.edu.au> | 2007-07-18 04:55:53 +0000 |
commit | 163efd68fae4e23a2d4182839d776da04c363153 (patch) | |
tree | 685f7ef7f24d74291308e5c96c375aceca1e63ac | |
parent | 6789720ce2765f7f9b395e86447ea7c0b14df64e (diff) | |
download | haskell-163efd68fae4e23a2d4182839d776da04c363153.tar.gz |
Refactoring
-rw-r--r-- | compiler/vectorise/VectType.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/vectorise/VectType.hs b/compiler/vectorise/VectType.hs index 15b2a5bec0..dfebe18493 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 |