GHC uses _stub.c files regardless of whether any 'foreign import' decls remain in a .hs file
It appears GHC links any _stub.o files it can find, which is not correct (although usually it only leads to duplicate symbols.) To duplicate, have two modules A and B, and a foreign import in A. A_stub.o will be built as usual. Copy A_stub.o to B_stub.o, relink and have duplicate symbols.
|Operating system||MacOS X|