Picon

Importing Repa library

Hello! :) I want to write a simple application, using the Repa library as a university project, but I don't know much about Haskell. I'm using Windows, so I downloaded and installed Haskell platform for Windows, then I run in the command prompt cabal update, then cabal install cabal-install and then cabal install repa and everything seemed fine. Then I put this script 

import qualified Data.Array.Repa as R
:m +Data.Array.Repa
Z

into the file "file.hs", opened WinGHCi and loaded the file, and then evaluated it, but what I get is: 

Could not find module `Data.Array.Repa'
Perhaps you meant
Data.Array.Base (from array-0.4.0.0)
Data.Array.IO (from array-0.4.0.0)
Data.Array.ST (from array-0.4.0.0)
Use -v to see a list of the files searched for.
Failed, modules loaded: none.

I read that "This happens when you install a package globally, and the previous packages were installed locally. Note that cabal-install install locally by default and the "runhaskell Setup" commands install globally by default.", but I think that I installed Repa locally, not globally.

Also ghc-pkg list repa says:

WARNING: cache is out of date: C:/Program Files/Haskell Platform/2012.4.0.0\lib\package.conf.d\package.cache use 'ghc-pkg recache' to fix. C:/Program Files/Haskell Platform/2012.4.0.0\lib\package.conf.d: C:\Users\Faery\AppData\Roaming\ghc\i386mingw32-7.4.2\package.conf.d:

And after executing recache, I get the same. 

Please help me to fix this issue and to be able to use the library. 
Thank you very much in advance for your time and goodness! 
_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Henning Thielemann | 3 Jan 14:13 2013
Picon

Re: Importing Repa library


On Thu, 3 Jan 2013, Емануела Моллова wrote:

> Hello! :)

I think you should better post your question to haskell-cafe <at> haskell.org.

> Then I put this script 
> 
> import qualified Data.Array.Repa as R
> :m +Data.Array.Repa
> Z
> 
> into the file "file.hs",

This is GHCi syntax, but it is not a valid Haskell module as indicated by 
the .hs filename extension.

> opened WinGHCi and loaded the file, and then evaluated it, but what I get is: 
> 
> Could not find module `Data.Array.Repa'
> Perhaps you meant
> Data.Array.Base (from array-0.4.0.0)
> Data.Array.IO (from array-0.4.0.0)
> Data.Array.ST (from array-0.4.0.0)
> Use -v to see a list of the files searched for.
> Failed, modules loaded: none.

I wonder why it loads file.hs at all. I would expect that it gives a 
syntax error.

> Also ghc-pkg list repa says:
> 
> WARNING: cache is out of date: C:/Program Files/Haskell Platform/2012.4.0.0\lib\package.conf.d\package.cache
> use 'ghc-pkg recache' to fix. C:/Program Files/Haskell Platform/2012.4.0.0\lib\package.conf.d:
> C:\Users\Faery\AppData\Roaming\ghc\i386mingw32-7.4.2\package.conf.d:

Since 'repa' is not listed, it was not installed successfully. This would 
be consistent with the "Could not find module" message of GHCi. You may 
post the output of the 'cabal install repa' run.
_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Gmane