[Haskell-cafe] Hdevtools cabal support

João Cristóvão jmacristovao at gmail.com
Fri Feb 21 12:37:32 UTC 2014

> It would be nice to have a tool that extracts the ghc relevant options
> from the cabal file which then could be used by ghc-mod, hdevtools or
> any other tool that wants to use ghc in conjunction with cabal.

Personally, I would like that very much, and I would be an active user.

Why not just a parameter, much like cabal own behaviour:

cabal build - sane default
cabal build exe:whatever - build executable whatever
babal build lib:whatever - build executable whatever

Its not really critical that the default is a cover all scenario, as long
as you have those other options. Then you could just configure an editor
(vim) setting to manually tell it what should it do.

I would prefer that, even if it meant a little more configuration work,
than having a 'merge all' situation that does, typically, more harm than

> I think the "right" way might be to find the associated cabal target
> for the current source file.

I also have doubts that this is possible.


2014-02-21 12:22 GMT+00:00 Daniel Trstenjak <daniel.trstenjak at gmail.com>:

> Hi Alan,
> On Fri, Feb 21, 2014 at 02:09:28PM +0200, AlanKim Zimmerman wrote:
> > In terms of using the right section of cabal, in the dev/editor
> environment you
> > actually need to union of all the cabal targets, so all the various
> hs-src
> > directories etc are in scope.
> You might get an issue by doing it that way, just think about two
> executables having modules with the same name.
> I think the "right" way might be to find the associated cabal target
> for the current source file.
> But I don't know if it's possible to always get a unique cabal target.
> Greetings,
> Daniel
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140221/9d0ea947/attachment.html>

More information about the Haskell-Cafe mailing list