[Haskell-cafe] How to use cabal's data-files feature and run in-place?

Richard Cobbe cobbe at ccs.neu.edu
Fri Apr 22 13:59:26 CEST 2011


On Fri, Apr 22, 2011 at 09:23:32AM +0200, Max Rabkin wrote:
> On Fri, Apr 22, 2011 at 03:46, Richard Cobbe <cobbe at ccs.neu.edu> wrote:
> > Unfortunately, that's not happening.  Cabal is clearly generating the
> > module; I can see it in dist/build/autogen.  But my copy is overriding the
> > autogenerated one, even for cabal builds -- at least, that's what I'm
> > seeing when I run the binary out of dist/build/<package>/<executable>.
>
> I'm no Cabal expert, but the first thing I'd try is to leave your copy
> out of  the list of included files in the Cabal file.

I'm not listing the included files, actually -- all I have is a "main-is:"
setting, and ghc is pulling the rest in through automatic dependency
detection.

Actually, that suggests another strategy: if there's a way in the cabal
file to configure ghc's search path, then I could make sure that the
cabal-generated file is seen before mine.  It's a little fragile, though,
as it depends on the precise place that cabal puts the generated file.
I'll look into that.

Richard



More information about the Haskell-Cafe mailing list