Linking individual projects to the GHC

Well, it should be simple, but it seems it cannot understand it. I have two projects: ProjectA and ProjectB. ProjectB depends on the old ProjectA project. Now I want to create ProjectB. And now I do not want to change the directory structure for ProjectA. The problem is that I always used the -outputdir bin with ProjectA.

ProjectA looked like this:

ProjectA/
  bin/
    (*.o, *.hi in proper paths, sometimes also *.p_o and *.p_hi)
  Foo/
    ModuleX.hs
  ModuleA.hs
  ModuleB.hs

Now I have another folder with ProjectB with its own separate -outputdir. I just need to link the old project object files (without recompiling the ProjectA files). I understand that I can possibly abandon ProjectA ... but is there an easier way?

+5
source share
1 answer

" " - Cabal. , Project A, , , , - ; GHC .

, -i GHC, , .

http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/separate-compilation.html

+2

All Articles