diff options
Diffstat (limited to 'testsuite/tests/codeGen/should_run/1852.hs')
-rw-r--r-- | testsuite/tests/codeGen/should_run/1852.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/1852.hs b/testsuite/tests/codeGen/should_run/1852.hs new file mode 100644 index 0000000000..f5d9370741 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/1852.hs @@ -0,0 +1,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 |