summaryrefslogtreecommitdiff
path: root/compiler/vectorise
diff options
context:
space:
mode:
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>2007-11-18 04:52:03 +0000
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>2007-11-18 04:52:03 +0000
commitdf6bc2ccddd8ff359e0381f4bb47e772e999029a (patch)
treee69f796f760ca6b39198c51712e60f9bd5592386 /compiler/vectorise
parenta9192907a271905c4ec1a37b1737ce119ac48905 (diff)
downloadhaskell-df6bc2ccddd8ff359e0381f4bb47e772e999029a.tar.gz
Fix bug in generation of environments for vectorisation
Diffstat (limited to 'compiler/vectorise')
-rw-r--r--compiler/vectorise/VectUtils.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/vectorise/VectUtils.hs b/compiler/vectorise/VectUtils.hs
index a540b4d10c..fcdcfd9e01 100644
--- a/compiler/vectorise/VectUtils.hs
+++ b/compiler/vectorise/VectUtils.hs
@@ -455,7 +455,7 @@ mkLiftEnv lc tys vs
env = Var (dataConWrapId env_con)
`mkTyApps` env_tyargs
- `mkVarApps` (lc : vs)
+ `mkApps` (Var lc : args)
bind env body = let scrut = unwrapFamInstScrut env_tc env_tyargs env
in
@@ -466,6 +466,9 @@ mkLiftEnv lc tys vs
where
vty = mkCoreTupTy tys
+ args | null vs = [Var unitDataConId]
+ | otherwise = map Var vs
+
bndrs | null vs = [mkWildId unitTy]
| otherwise = vs