id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
22,IndexScalar does not produce the correct value when it is used in the default value expression of scan and fold,seanl,seanl,"{{{IndexScalar}}} does not produce the correct value when it is used in the default value expressions of scan and fold.

For example,

{{{
foo :: Vector Word32 -> Acc (Vector Word32)
foo xs
  = let
      xs' = use xs
    in
    Prelude.fst $ Acc.scanl const (xs' Acc.! constant 4) xs'

main :: IO ()
main = do
  let input = fromList 10 [0..] :: Vector (Word32)
  r <- CUDA.run $ foo input2
  putStrLn $ show r
}}}

is meant to produce 

{{{
Array 10 [4,4,4,4,4,4,4,4,4,4]
}}}

but it produces

{{{
Array 10 [0,0,0,0,0,0,0,0,0,0]
}}}",defect,closed,major,,CUDA backend,0.7.1.0,fixed,,
