Use OPTIONS rather than OPTIONS_GHC for pragmas
[ghc-hetmet.git] / compiler / vectorise / Vectorise.hs
index 85f4e46..6fd6190 100644 (file)
@@ -1,3 +1,10 @@
+{-# 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/CodingStyle#Warnings
+-- for details
+
 module Vectorise( vectorise )
 where
 
@@ -211,9 +218,13 @@ vectExpr e@(_, AnnApp _ arg)
 
 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