git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Try to fix #1548
commita016cba0b99773d62f330f9c5f2f849b8af69178 authorPhil Freeman <paf31@cantab.net> dateFri 23 Oct 2015, 15:47 (11 years ago) parent3794bda
1 file changed+22−22
src/Language/PureScript/Make.hs+22−22
src/Language/PureScript/Make.hs+22−22
@@ -207,19 +207,19 @@ make MakeActions{..} ms = do
207207 -- MVars for the module's dependencies.
208208 mexterns <- fmap unzip . sequence <$> mapM (readMVar . fst . fromMaybe (error "make: no barrier") . flip lookup barriers) deps
209209
210− outputTimestamp <- getOutputTimestamp moduleName
211− dependencyTimestamp <- maximumMaybe <$> mapM (fmap shouldExist . getOutputTimestamp) deps
212− inputTimestamp <- getInputTimestamp moduleName
213−
214− let shouldRebuild = case (inputTimestamp, dependencyTimestamp, outputTimestamp) of
215− (Right (Just t1), Just t3, Just t2) -> t1 > t2 || t3 > t2
216− (Right (Just t1), Nothing, Just t2) -> t1 > t2
217− (Left RebuildNever, _, Just _) -> False
218− _ -> True
219−
220− let rebuild =
221− case mexterns of
222− Just (_, externs) -> do
210+ case mexterns of
211+ Just (_, externs) -> do
212+ outputTimestamp <- getOutputTimestamp moduleName
213+ dependencyTimestamp <- maximumMaybe <$> mapM (fmap shouldExist . getOutputTimestamp) deps
214+ inputTimestamp <- getInputTimestamp moduleName
215+
216+ let shouldRebuild = case (inputTimestamp, dependencyTimestamp, outputTimestamp) of
217+ (Right (Just t1), Just t3, Just t2) -> t1 > t2 || t3 > t2
218+ (Right (Just t1), Nothing, Just t2) -> t1 > t2
219+ (Left RebuildNever, _, Just _) -> False
220+ _ -> True
221+
222+ let rebuild = do
223223 (exts, warnings) <- listen $ do
224224 progress $ CompilingModule moduleName
225225 let env = foldl' (flip applyExternsFileToEnvironment) initEnvironment externs
@@ -235,15 +235,15 @@ make MakeActions{..} ms = do
235235 evalSupplyT nextVar $ codegen renamed env' $ encode exts
236236 return exts
237237 markComplete (Just (warnings, exts)) Nothing
238− Nothing -> markComplete Nothing Nothing
239−
240− if shouldRebuild
241− then rebuild
242− else do
243− mexts <- decodeExterns . snd <$> readExterns moduleName
244− case mexts of
245− Just exts -> markComplete (Just (mempty, exts)) Nothing
246− Nothing -> rebuild
238+
239+ if shouldRebuild
240+ then rebuild
241+ else do
242+ mexts <- decodeExterns . snd <$> readExterns moduleName
243+ case mexts of
244+ Just exts -> markComplete (Just (mempty, exts)) Nothing
245+ Nothing -> rebuild
246+ Nothing -> markComplete Nothing Nothing
247247 where
248248 markComplete :: Maybe (MultipleErrors, ExternsFile) -> Maybe MultipleErrors -> m ()
249249 markComplete externs errors = do