
When GHC compiles a module (say M.hs) which uses foreign export or foreign import "wrapper", it generates two additional files, M_stub.c and M_stub.h. GHC will automatically compile M_stub.c to generate M_stub.o at
#10467: user's guide description of "foreign export" is out of date -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.10.1 Documentation | Operating System: Unknown/Multiple Keywords: | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- The first sentence of section 8.2.1 is the same time. This is false at least for registerised builds, GHC produces an object file directly and its filename is `M.o` not `M_stub.o`. (I don't know what happens in the unregisterised case, but if the final object file name is actually different, that seems inconsistent.) The rest of the section makes similar references to the nonexistent `M_stub.c` and `M_stub.o`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10467 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler