Re: [Haskell-cafe] Re: ghci can't find Paths_ module created by cabal

2009-10-26 Thread Duncan Coutts
On Wed, 2009-10-21 at 22:31 -0500, Thomas Hartman wrote:
 from my bash hints file:
 
 thart...@ubuntu:~/haskellInstalls/gititthartman_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

another approach is to:

export hoogle_datadir=$PWD

because the standard Paths_hoogle module uses these environment variable
overrides.

Some day, someone is going to implement a ghci mode for cabal, to do
the pre-processing and invoke ghci with all the right flags and env
vars. See ticket #382.

Duncan

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: ghci can't find Paths_ module created by cabal

2009-10-21 Thread Thomas Hartman
from my bash hints file:

thart...@ubuntu:~/haskellInstalls/gititthartman_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 gree...@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
 librar...@haskell.org
 http://www.haskell.org/mailman/listinfo/libraries

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe