Fixed binding order for loop initialisers.
avoid clobbering variables in fold & scan accumulators

See note: [Mutable l-values]

Fixes AccelerateHS/accelerate#114 and AccelerateHS/accelerate#168
add asynchronous device-device copy
apply permute combination function atomically

fixes AccelerateHS/accelerate#137
update comment regarding hardware requirements for permute
update headers
use HTYPE_CCHAR macro

on ARM CChar is Word8 not Int8.
evaluate the arguments to primitive functions in statement expressions

AccelerateHS/accelerate#187
wibbles for primitive function codegen

Split into unary and binary cases. This avoids having to supply the arguments as a one-or-two element list and pattern match on this.
use if statement blocks for conditionals

fixes AccelerateHS/accelerate#184
codegen while loop wibbles
Merged changes from main repo.

Conflicts:
	Data/Array/Accelerate/CUDA/Array/Prim.hs