Skip to content

Dependency information for the linking step

I'd like to let GHC report which object files are linked together when called with "--make", such as: "ghc -M --make Prog.hs". "-M" can't be used in conjunction with "--make".

I have many small main programs that share inner modules. Some of the inner and main modules are c2hs-input files (.chs), which must be processed by c2hs first, to produce a .hs file. "ghc --make" can be used in the linking step, but it doesn't know about c2hs, and can't call it automatically. So I need the makefile to take care of the dependencies.

Normally, you'd have just one main module, and link everything together. But I want to recompile only the modules needed for some specific program. There's no easy way to get the information which object files make up a program, and must be recompiled, because the object files depend only on the .hi-files of the imported modules, not on the modules themselves.

Trac metadata
Trac field Value
Version 6.4.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information