
On Wed, 2006-11-29 at 17:12 +0100, Ulf Norell wrote:
Hi.
Currently when Cabal preprocesses a module the result ends up in the source directory. I would have expected it to end up in dist, since it's a generated file and not a source file.
I would tend to agree. Wherever possible I think it'd be preferable to put generated sources in the build tree not the source tree.
So, - are there strong reasons for putting preprocessed files in src?
Mostly, not having got round to doing it. If you're volunteering to look into doing this, then great! There are cases, as Stefan mentions, where it's less clear cut, like generated sources that we expect to distribute.
- if not, is there a simple (and robust) way to have them end up in dist?
I expect not. I think it needs changes to Cabal. I think it should be possible though, since most tools either allow the locations of all the source files to be specified explicitly, or provide a search dir feature. Duncan

On Nov 30, 2006, at 2:14 AM, Duncan Coutts wrote:
- are there strong reasons for putting preprocessed files in src?
Mostly, not having got round to doing it. If you're volunteering to look into doing this, then great!
I wish I had the time... I have the feeling that this would be a non- local change, so I would have to spend lots of time reading up on the innards of Cabal to figure out what else needs to change when you put preprocessed files in dist. / Ulf
participants (2)
-
Duncan Coutts
-
Ulf Norell