-outputForeignStubs dflags NoStubs = do
--- When compiling External Core files, may need to use stub files from a
--- previous compilation
- hFileExists <- doesFileExist (hscStubHOutName dflags)
- cFileExists <- doesFileExist (hscStubCOutName dflags)
- return (hFileExists, cFileExists)
-outputForeignStubs dflags (ForeignStubs h_code c_code _ _)
+outputForeignStubs dflags mod location stubs
+ | NoStubs <- stubs = do
+ -- When compiling External Core files, may need to use stub
+ -- files from a previous compilation
+ stub_c_exists <- doesFileExist stub_c
+ stub_h_exists <- doesFileExist stub_h
+ return (stub_h_exists, stub_c_exists)
+
+ | ForeignStubs h_code c_code _ _ <- stubs