Remember that shapes are stored separately to data in repa, so you would be reshaping the array from DIM1 to DIM3, without changing the extent of the array.
We have a DIM1 (flat) array:
> let x :: Array DIM1 Double ; x = fromList (Z :. (9::Int)) [1..9]
> x
Array (Z :. 9) [1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]
It's extent is:
> extent x
Z :. 9
Using reshape we can 'cast' the shape of the array from 1D to 3D:
> let y :: Array DIM3 Double ;
y = reshape (Z :. (3::Int) :. (3::Int) :. (1::Int)) x
> y
Array (Z :. 3 :. 3 :. 1) [1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]
And its type changes:
> :t y
y :: Array DIM3 Double