Cabals' Paths_pkg and GHCi

Simon Marlow simonmarhaskell at
Tue Nov 14 05:21:17 EST 2006

Vyacheslav Akhmechet wrote:
> Hi,
> I took advantage of Cabal's data-files feature to allow me to portably
> store and access data files. Cabal generated a Paths_pkg module that I
> imported. From Cabal's point of view everything works: I can
> configure, build, install, and run. However, I can no longer use GHCi
> with the file that imports Paths_pkg - GHCi simply can't find the
> module.
> Is there a good way to fix this issue?

The Paths_foo.hs file is generated in a separate directory, something like 
dist/autogen/ (I can't remember exactly, you should be able to find it).  To get 
GHCi to find it, you'll need to pass an appropriate -i <dir> flag.


More information about the Glasgow-haskell-users mailing list