[Haskell-cafe] a couple of cabal related questions
magnus at therning.org
Tue Oct 12 05:45:40 EDT 2010
On Tue, Oct 12, 2010 at 10:20, Dmitry V'yal <akamaus at gmail.com> wrote:
> recently I've cabalized my program and it brought some problems.
> First of all, I made use of 'import Paths_<package name>' functionality to
> get the path of installed data files. It works great, but now I can no
> longer run my program in ghci because this module is auto-generated by
> cabal. I tried to supply my own. This way ghci works, but my stub module
> gets compiled into the binary in place of auto-generated. And things break
> again. What's the best way to overcome it?
Create a file called .ghci in the directory where you run ghci and
make it contains something like this:
> And another question. I'd like to make my program output it's version
> string. Of course, I can hardcode it into sources, but I've already
> specified one in the cabal file. Is there any way to get it back in the run
It's in Paths_<package name> as the variable 'version'.
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus＠therning．org Jabber: magnus＠therning．org
http://therning.org/magnus identi.ca|twitter: magthe
More information about the Haskell-Cafe