Vectorise nullary constructors correctly
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 22 Aug 2007 01:59:30 +0000 (01:59 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 22 Aug 2007 01:59:30 +0000 (01:59 +0000)
compiler/vectorise/VectUtils.hs

index 46766ea..dbdc38f 100644 (file)
@@ -296,6 +296,8 @@ mkClosureApp (vclo, lclo) (varg, larg)
     (arg_ty, res_ty) = splitClosureTy (exprType vclo)
 
 buildClosures :: [TyVar] -> [VVar] -> [Type] -> Type -> VM VExpr -> VM VExpr
+buildClosures tvs vars [] res_ty mk_body
+  = mk_body
 buildClosures tvs vars [arg_ty] res_ty mk_body
   = buildClosure tvs vars arg_ty res_ty mk_body
 buildClosures tvs vars (arg_ty : arg_tys) res_ty mk_body