I think you may have two different versions of repa
in play. Check by saying
ghc-pkg list repa
and see how many versions show up. I suspect you're importing Data.Array.Repa
from one instance, but Data.Array.Repa.IO.DevIL
depends on the other. The hint is in the error message:
Couldn't match expected type `Array r0 DIM3 a0'
with actual type `repa-3.2.3.1:Data.Array.Repa.Base.Array
Once, GHC says Array
, and once, it says repa-3.2.3.1:Data.Array.Repa.Base.Array
. This usually means that it explicitly wants to make a difference between two occurrences of the type Array
here.
If my suspicion is correct, you can either hide one version of repa
(the one that's not version 3.2.3.1
and being used by repa-devil
) by passing
-hide-package repa-<version>
(with the correct version number filled in) to GHC, or you can hide the package via
ghc-pkg hide repa-<version>