[Haskell-cafe] Cabal: disabling -fvia-C

Brandon Moore brandon_m_moore at yahoo.com
Tue May 24 14:58:28 CEST 2011

> Henning Thielemann, Tuesday, May 24, 2011

> On Tue, 24 May 2011, Jacek Generowicz wrote:
>>  On 2011 May 24, at 11:12, Jacek Generowicz wrote:
>>>  I have found an {-# OPTION -fvia-C #-} deep inside the lambdabot code 
> in Plugin/Pl/Common.hs. How can I tell cabal install to ignore this? Is there 
> some command line option for doing so, or do I have to edit the source code and 
> somehow persuade cabal to use my hacked version ?
>>  The edited source code is ignored by cabal install. However, if you tar.gz 
> the edited source code and replace the original tarball (making sure that you do 
> *not* remove the untarred directory (it seems that you can remove its contents, 
> but not the directory itself)), then cabal install works and lambdabot installs.
> You cannot only run
> $ cabal install lambdabot
> but you can also switch to lambdabot source directory and call
> lambdabot$ cabal install

Those two options cover the building. Putting a .tar.gz in the cabal
package directory might be a bit more convenient if you use cabal-dev,
or otherwise have to frequently rebuild packages.

If you are going to write other code that depends on your fix to the package,
you should probably increase the version number in the modified package,
so you don't copy your project to another system and take a while to
realize it's getting the hackage version of the dependency, rather than your fix.
This probably isn't an issue with lambdabot.


More information about the Haskell-Cafe mailing list