Re: Cabals' Paths_pkg and GHCi

2006-11-14 Thread Simon Marlow

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.


Cheers,
Simon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Cabals' Paths_pkg and GHCi

2006-11-14 Thread Claus Reinke
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.


a general question about cabal and ghci:

if I have successfully loaded my project files into ghci, I've presumably
set all the right flags and paths, for ghci. 


if I have successfully created a cabal project, I've presumably
encoded all the right flags and paths, for cabal.

would it be possible to add a cabal command to ghci, so that
we could:

   - create a cabal file for the currently loaded project
   - load a project from a cabal file

or does this make no sense? doesn't visual haskell do something 
like that, using cabal behind the scenes?


cheers,
claus

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: Cabals' Paths_pkg and GHCi

2006-11-14 Thread Simon Marlow
Claus Reinke wrote:
 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.

 a general question about cabal and ghci:

 if I have successfully loaded my project files into ghci,
 I've presumably
 set all the right flags and paths, for ghci.

 if I have successfully created a cabal project, I've presumably
 encoded all the right flags and paths, for cabal.

 would it be possible to add a cabal command to ghci, so that we
 could:

 - create a cabal file for the currently loaded project
 - load a project from a cabal file

 or does this make no sense? doesn't visual haskell do something
 like that, using cabal behind the scenes?

Actually I did write the code for such a thing a while back, but never finished 
it off.  There's a design choice; do you want

  - GHCi to understand .cabal files, or
  - Cabal to launch GHCi

I concluded that the latter would be better, because then any hooks in your 
Setup.hs file still work, for example.  I think this would make a nice 
bitesized task for someone who wants to do some Cabal hacking.

Cheers,
Simon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users