對於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 mean
我不明白爲什麼這個程序使用repa: import Data.Array.Repa
import Data.Array.Repa.Algorithms.Matrix
import Data.Functor.Identity
go = runIdentity $ do
let mat = fromListUnboxed (ix2 2 2) [1..4]
let ins =
我正在玩Repa,下面的代碼可以編譯和運行。 import qualified Data.Array.Repa as R
--t:: R.Array R.U (R.Z R.:. Int) Float
--t = R.fromListUnboxed (R.Z R.:. (10::Int)) ([1.0..10]::[Float])
main = do
let x = R.fromL