4 Oct 2012 12:50
Creating Repa arrays from unboxed vectors
Janek S. <fremenzone <at> poczta.onet.pl>
2012-10-04 10:50:10 GMT
2012-10-04 10:50:10 GMT
Dear list,
I'm trying to create unboxed REPA array from unboxed Vector, but I keep getting this type error:
ghci> :m + Data.Array.Repa
ghci> :m + Data.Array.Repa.Repr.Unboxed
ghci> :m + Data.Vector.Unboxed
ghci> fromUnboxed Z (Data.Vector.Unboxed.singleton 1)
<interactive>:5:16:
Couldn't match expected type `vector-0.9.1:Data.Vector.Unboxed.Base.Vector
e0'
with actual type `Data.Vector.Unboxed.Vector a0'
In the return type of a call of `Data.Vector.Unboxed.singleton'
In the second argument of `fromUnboxed', namely
`(Data.Vector.Unboxed.singleton 1)'
In the expression: fromUnboxed Z (Data.Vector.Unboxed.singleton 1)
I am confused, because REPA documentation lists Vector from Data.Vector.Unboxed package as its
second parameter. Why am I getting this error? I have Repa 3.2 an vector 0.9.1.
Janek
RSS Feed