I've installed the Vector
package and REPA
using Cabal for GHC 7.10.2. Running this program:
import qualified Data.Array.Repa as R
import qualified Data.Vector.Unboxed as U
main = print $ R.fromUnboxed (R.Z R.:. 16 R.:. 16) (U.replicate 10 0)
I get the following error:
repa.hs:4:53:
Couldn't match expected type ‘vector-0.10.12.3:Data.Vector.Unboxed.Base.Vector
e0’
with actual type ‘U.Vector a0’
NB: ‘vector-0.10.12.3:Data.Vector.Unboxed.Base.Vector’
is defined in ‘Data.Vector.Unboxed.Base’
in package ‘vector-0.10.12.3’
‘U.Vector’
is defined in ‘Data.Vector.Unboxed.Base’
in package ‘vector-0.11.0.0’
In the second argument of ‘R.fromUnboxed’, namely
‘(U.replicate 10 0)’
In the second argument of ‘($)’, namely
‘R.fromUnboxed (R.Z R.:. 16 R.:. 16) (U.replicate 10 0)’
Running ghc-pkg list | grep vector
, I noticed 2 versions of the vector package:
vector-0.10.12.3
vector-0.11.0.0
vector-th-unbox-0.2.1.2
I ran ghc-pkg hide vector-0.10.12.3
and tried recompiling, but the error persists. It seems that vector-0.10.12.3
already came installed (is it part of Base?) but it didn't expose Data.Vector.Unboxed
. How can I solve this issue?