On 10-Oct-2001, Hal Daume III <hcd@andrew.cmu.edu> wrote:
So, barring this, I'm curious how other people handle this issue.
I have multiple projects. Call them A, B, C. They are in directories: ~/projects/A ~/projects/B ~/projects/C repsectively.
Say I'm creating a new project, D, in ~/projects/D that uses code that I've written in packages A, B and C. Now, as far as I can see, I have two options:
1) Copy all the .(l)hs files from /A, /B, and /C to /D that I need to import 2) Include projects/A, projects/B and projects/C in my search path for ghc(i)
I hate both of these options. 1 is terrible because I have multiple copies of the same code lying around and, if I make changes to one, I have to remember to copy the changes over to the others. 2 is a big nuisance, especially since ghc (seems to) lack an environment variable that it looks at to get command line options every time it runs (HUGSFLAGS, I think it was for Hugs).
Well, I wouldn't be invoking ghc manually anyway; I'd put the commands to invoke ghc in a script or, more likely, in a Makefile. -- Fergus Henderson <fjh@cs.mu.oz.au> | "... it seems to me that 15 years of The University of Melbourne | email is plenty for one lifetime." WWW: <http://www.cs.mu.oz.au/~fjh> | -- Prof. Donald E. Knuth