[Haskell-cafe] Re: ghci can't find Paths_ module created by cabal
Thomas Hartman
tphyahoo at gmail.com
Wed Oct 21 23:31:16 EDT 2009
from my bash hints file:
thartman at ubuntu:~/haskellInstalls/gitit>thartman_ghci_with_data_files
Loading a package with data files in ghci
See http://neilmitchell.blogspot.com/2008/02/adding-data-files-using-cabal.html
Snip:
The above method works well after a program has been installed,
but is harder to work with while developing a program. To alleviate
these problems, we can add our own Paths module to the program, for
example:
module Paths_hoogle where
getDataFileName :: FilePath -> IO FilePath
getDataFileName = return
Place this module alongside all the other modules. While
developing the program our hand-created Paths module will be invoked,
which says the data is always in the current directory. When doing a
Cabal build, Cabal will choose its custom generated Paths module over
ours, and we get the benefits of Cabal managing our data.
2009/10/21 Robin Green <greenrd at greenrd.org>:
> I'm trying to run cabal-install in ghci so I can run it under the ghci
> debugger. However I try it, though, I always get one of these two
> errors:
>
> /src/greenrd/darcs/cabal-install/Main.hs:70:17:
> Could not find module `Paths_cabal_install':
> Use -v to see a list of the files searched for.
> Failed, modules loaded: none.
>
> or
>
> <command line>:
> Could not find module `Main':
> Use -v to see a list of the files searched for.
>
> --
> Robin
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
More information about the Haskell-Cafe
mailing list