projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix vectorisation of recursive types
[ghc-hetmet.git]
/
compiler
/
vectorise
/
Vectorise
/
Type
/
Env.hs
diff --git
a/compiler/vectorise/Vectorise/Type/Env.hs
b/compiler/vectorise/Vectorise/Type/Env.hs
index
99c1746
..
61a52bc
100644
(file)
--- a/
compiler/vectorise/Vectorise/Type/Env.hs
+++ b/
compiler/vectorise/Vectorise/Type/Env.hs
@@
-82,6
+82,13
@@
vectTypeEnv env
let vect_tcs = filter (not . isClassTyCon)
$ keep_tcs ++ new_tcs
let vect_tcs = filter (not . isClassTyCon)
$ keep_tcs ++ new_tcs
+ reprs <- mapM tyConRepr vect_tcs
+ repr_tcs <- zipWith3M buildPReprTyCon orig_tcs vect_tcs reprs
+ pdata_tcs <- zipWith3M buildPDataTyCon orig_tcs vect_tcs reprs
+ updGEnv $ extendFamEnv
+ $ map mkLocalFamInst
+ $ repr_tcs ++ pdata_tcs
+
-- Create PRepr and PData instances for the vectorised types.
-- We get back the binds for the instance functions,
-- and some new type constructors for the representation types.
-- Create PRepr and PData instances for the vectorised types.
-- We get back the binds for the instance functions,
-- and some new type constructors for the representation types.
@@
-89,8
+96,6
@@
vectTypeEnv env
do
defTyConPAs (zipLazy vect_tcs dfuns')
reprs <- mapM tyConRepr vect_tcs
do
defTyConPAs (zipLazy vect_tcs dfuns')
reprs <- mapM tyConRepr vect_tcs
- repr_tcs <- zipWith3M buildPReprTyCon orig_tcs vect_tcs reprs
- pdata_tcs <- zipWith3M buildPDataTyCon orig_tcs vect_tcs reprs
dfuns <- sequence
$ zipWith5 buildTyConBindings
dfuns <- sequence
$ zipWith5 buildTyConBindings