{-# LANGUAGE MagicHash #-} {-# OPTIONS -fglasgow-exts #-} import Data.Array.Vector import Data.Word import GHC.Prim import GHC.Base (Int(..)) import GHC.Float(Double(..),Float(..)) n = 40000000 main = do let c = replicateU n (2::Word) a = mapU fromIntegral (enumFromToU 0 (n-1) ) :: UArr Word print (sumU (zipWithU (*) c a)) -- realToFrac here misses are rule with 6.8.2