
On Tue, Oct 12, 2010 at 10:20, Dmitry V'yal
Hello,
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: :set -idist/build/autogen
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 time?
It's in Paths_<package name> as the variable 'version'. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe