git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Rebuild modules if necessary when using --dump-corefn (#2623)
commit344f6cc711df9c838bc4d8454fc95491b1952853 authorPhil Freeman <paf31@cantab.net> dateSun 5 Feb 2017, 11:34 (10 years ago) parentd55d7f0
1 file changed+6−1
src/Language/PureScript/Make.hs+6−1
src/Language/PureScript/Make.hs+6−1
@@ -326,10 +326,15 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
326326
327327 getOutputTimestamp :: ModuleName -> Make (Maybe UTCTime)
328328 getOutputTimestamp mn = do
329+ dumpCoreFn <- asks optionsDumpCoreFn
329330 let filePath = T.unpack (runModuleName mn)
330331 jsFile = outputDir </> filePath </> "index.js"
331332 externsFile = outputDir </> filePath </> "externs.json"
332− min <$> getTimestamp jsFile <*> getTimestamp externsFile
333+ coreFnFile = outputDir </> filePath </> "corefn.json"
334+ min3 js exts coreFn
335+ | dumpCoreFn = min (min js exts) coreFn
336+ | otherwise = min js exts
337+ min3 <$> getTimestamp jsFile <*> getTimestamp externsFile <*> getTimestamp coreFnFile
333338
334339 readExterns :: ModuleName -> Make (FilePath, Externs)
335340 readExterns mn = do