summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/T1852.hs
blob: f5d9370741891795d1a45501c9787af1919f85bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# OPTIONS_GHC -funbox-strict-fields #-}
import Data.List

data Vec4 = Vec4 !Float !Float !Float !Float


main :: IO ()
main = print traceList

traceList = concatMap (\(x,y) -> let (r,g,b,a) = getPixel (x,y) in [r,g,b,a])
    [(0,0)]
    where
    getPixel (x,y) = (red,green,blue,alpha)
        where
        Vec4 fr fg fb fa = seq x (Vec4 1 2 3 4)
        red = round fr
        green = round fg
        blue = round fb
        alpha = round fa