+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
module Vectorise( vectorise )
where
vectExpr (_, AnnApp fn arg)
= do
- fn' <- vectExpr fn
- arg' <- vectExpr arg
- mkClosureApp fn' arg'
+ arg_ty' <- vectType arg_ty
+ res_ty' <- vectType res_ty
+ fn' <- vectExpr fn
+ arg' <- vectExpr arg
+ mkClosureApp arg_ty' res_ty' fn' arg'
+ where
+ (arg_ty, res_ty) = splitFunTy . exprType $ deAnnotate fn
vectExpr (_, AnnCase scrut bndr ty alts)
| isAlgType scrut_ty