git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #1180 from purescript/1174

Fix #1174, check foreign files for staleness

commit6e267afbd08c7632da94868299cadb4dfd07ac02 authorPhil Freeman <paf31@cantab.net> dateFri 19 Jun 2015, 08:19 (11 years ago) parente748a7b3a1df02
1 file changed+3−1
psc-make/Make.hs+3−1
psc-make/Make.hs+3−1
@@ -74,7 +74,9 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
7474 getInputTimestamp :: P.ModuleName -> Make (Either P.RebuildPolicy (Maybe UTCTime))
7575 getInputTimestamp mn = do
7676 let path = fromMaybe (error "Module has no filename in 'make'") $ M.lookup mn filePathMap
77− traverseEither getTimestamp path
77+ e1 <- traverseEither getTimestamp path
78+ fPath <- maybe (return Nothing) (getTimestamp . fst) $ M.lookup mn foreigns
79+ return $ fmap (max fPath) e1
7880
7981 getOutputTimestamp :: P.ModuleName -> Make (Maybe UTCTime)
8082 getOutputTimestamp mn = do