|
RE: Text.ParserCombinators.Parsec requires -package text.: msg#00050lang.haskell.glasgow.bugs
On 13 September 2004 19:40, Claus Reinke wrote: >> Just to expand on this a little: it's not clear that we could do this >> even if we wanted to. Given an arbitrary .o file, we can't tell (a) >> if it is a compiled Haskell module and (b) if so, where its .hi file >> can be found. We can make guesses, but there isn't a general >> solution. > > the only .o files you're interested in are those you've created, no? > > so you could add that information to the .o file - but the .hi file > might have disappeared. however, the original question was about > finding required packages in the linking step, with only some .o file > at hand. > > so you could add info about required packages in the object file, > say as the value of some hidden default symbol, or as an unresolved > reference to a hidden symbol provided by the package. if, in the first > case, the <GHCrequired_packages> symbol doesn't exist or if, in the > second case, there's no reference to a <GHCprovides_package_P> > symbol, you know its not one of your object files, so it shouldn't > depend on your packages, should it? Yes, both of these are good ideas. However, they both require noodling in object files of course, which is non-portable. Or perhaps creative use of 'nm' or 'objdump' would do. In any case, I think we already arrived at a reasonable solution... Cheers, Simon
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Text.ParserCombinators.Parsec requires -package text., Claus Reinke |
|---|---|
| Next by Date: | [ ghc-Bugs-1025941 ] Big problems running ghc and ghci, SourceForge.net |
| Previous by Thread: | Re: Text.ParserCombinators.Parsec requires -package text., Malcolm Wallace |
| Next by Thread: | Windows nofib, Mike Thomas |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |