Creating Repa arrays from unboxed vectors

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

On 4 October 2012 20:50, Janek S.
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)
This makes it look like you've got two versions of vector installed, with Repa built against the version that _isn't_ 0.9.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
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com
participants (2)
-
Ivan Lazar Miljenovic
-
Janek S.