954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Question about linking in GHC

Hello everyone. I have been using the Haskell compiler GHC 6.6 a bit recently to test some simple programs (for learning purposes). In it's default mode it produces three output files for a given source file: a .exe, a .o and a .hi. The .exe is quite big and I found out elsewhere that's because it contains all the base Haskell runtime functions statically linked. Does anyone know what goes in the .hi file? I've just not used a compiler that produces three output files before, so I'm curious. I would assume the .o is an object file (i.e. contains the instructions generated from your source code).

Steven.

Mushy-pea
Posting Whiz in Training
275 posts since Jun 2006
Reputation Points: 47
Solved Threads: 1
 

Hi all. This question has been answered in IRC. If you came to this thread from a search engine, see http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html for an explanation.

Rashakil Fol
Super Senior Demiposter
Team Colleague
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You