Cabals' Paths_pkg and GHCi
Simon Marlow
simonmar at microsoft.com
Tue Nov 14 06:39:35 EST 2006
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
More information about the Glasgow-haskell-users
mailing list