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
/
Env.hs
diff --git
a/compiler/vectorise/Vectorise/Env.hs
b/compiler/vectorise/Vectorise/Env.hs
index
30f259b
..
70ed8c4
100644
(file)
--- a/
compiler/vectorise/Vectorise/Env.hs
+++ b/
compiler/vectorise/Vectorise/Env.hs
@@
-11,7
+11,8
@@
module Vectorise.Env (
initGlobalEnv,
extendImportedVarsEnv,
extendScalars,
initGlobalEnv,
extendImportedVarsEnv,
extendScalars,
- setFamInstEnv,
+ setFamEnv,
+ extendFamEnv,
extendTyConsEnv,
extendDataConsEnv,
extendPAFunsEnv,
extendTyConsEnv,
extendDataConsEnv,
extendPAFunsEnv,
@@
-142,11
+143,16
@@
extendScalars vs genv
-- | Set the list of type family instances in an environment.
-- | Set the list of type family instances in an environment.
-setFamInstEnv :: FamInstEnv -> GlobalEnv -> GlobalEnv
-setFamInstEnv l_fam_inst genv
+setFamEnv :: FamInstEnv -> GlobalEnv -> GlobalEnv
+setFamEnv l_fam_inst genv
= genv { global_fam_inst_env = (g_fam_inst, l_fam_inst) }
where (g_fam_inst, _) = global_fam_inst_env genv
= genv { global_fam_inst_env = (g_fam_inst, l_fam_inst) }
where (g_fam_inst, _) = global_fam_inst_env genv
+extendFamEnv :: [FamInst] -> GlobalEnv -> GlobalEnv
+extendFamEnv new genv
+ = genv { global_fam_inst_env = (g_fam_inst, extendFamInstEnvList l_fam_inst new) }
+ where (g_fam_inst, l_fam_inst) = global_fam_inst_env genv
+
-- | Extend the list of type constructors in an environment.
extendTyConsEnv :: [(Name, TyCon)] -> GlobalEnv -> GlobalEnv
-- | Extend the list of type constructors in an environment.
extendTyConsEnv :: [(Name, TyCon)] -> GlobalEnv -> GlobalEnv