我对 Haskell 比较陌生,我正在尝试Repa
在项目中使用包。我已经在我的源代码中使用 导入了包import qualified Data.Array.Repa as R
,但是在 ghci 中加载 Haskell 文件时,出现以下错误:
Location_repa.hs:46:26:
Not in scope: type constructor or class `D'
Perhaps you meant `R.D' (imported from Data.Array.Repa)
Location_repa.hs:46:29:
Not in scope: type constructor or class `Z'
Perhaps you meant `R.Z' (imported from Data.Array.Repa)
Location_repa.hs:46:30:
Illegal operator `:.' in type `Z :. (Dimension :: Int)'
Use TypeOperators to allow operators in types
.....
这是使用的源代码部分Repa
:
type CoordList = Array D (Z:. (Dimension::Int)) Integer
似乎没有导入(加载)包。使用ghc-pkg list repa
结果如下:
C:/Program Files/Haskell Platform/7.10.2-a\lib\package.conf.d:
(no packages)
C:\Users\...\AppData\Roaming\ghc\x86_64-mingw32-7.10.2\package.conf.d:
repa-3.4.1.1
我应该怎么办?