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

Duncan Coutts duncan.coutts at googlemail.com
Mon Oct 26 07:14:22 EDT 2009


On Wed, 2009-10-21 at 22:31 -0500, Thomas Hartman wrote:
> 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

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



More information about the Haskell-Cafe mailing list