Skip to content

user's guide description of "foreign export" is out of date

The first sentence of section 8.2.1 is

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 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.

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