id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
20	Code generation for nested tuple projection fails	seanl	tmcdonell	"The CUDA backend appears to be failing when generating the code for the following function, producing the error message, ""{{{*** Exception: Prelude.(!!): index too large}}}"":

{{{
{-# LANGUAGE ScopedTypeVariables #-}

module Main where

import Data.Array.Accelerate                (Acc, Exp, Vector)
import qualified Data.Array.Accelerate      as Acc
import qualified Data.Array.Accelerate.CUDA as CUDA

test :: Vector ((Float, Int), Double) -> Acc (Vector ((Float, Int), Double))
test xs =
  let xs' = Acc.use xs
  in flip Acc.map xs' $ \x ->
    let (a', c :: Exp Double)          = Acc.untuple x
        (a :: Exp Float, b :: Exp Int) = Acc.untuple a'
    in  Acc.tuple (Acc.tuple (a + 1, b + 2), c + 3)

main :: IO ()
main =
  let input = Acc.fromList 10 (zip (zip [0..9] [1..10]) [2..11])
  in
  print =<< CUDA.run (test input)
}}}"	defect	closed	major		CUDA backend	0.7.1.0	fixed		
