Namespaces (was Re: GUI Library Task Force)
John Meacham
john@repetae.net
Wed, 10 Oct 2001 15:43:23 -0700
On Wed, Oct 10, 2001 at 03:29:03PM -0400, Hal Daume III 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).
>
> So is there a third option that I'm missing? How do other people handle
> this issue?
Personally I use symbolic links, either to the file or to the whole
directory. This is not ideal since i cannot easily see which projects
depend on a given file but at least all the dependencies of a project
are visible under one directory without having to reverse-engineer the
makefile.
John
--
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john@repetae.net
---------------------------------------------------------------------------