@@ -116,29 +116,26 @@ buildTree built fp = btree [] fp
116 else return []
116 else return []
117 mt <- idrisCatch (runIO $ getModificationTime fn)
117 mt <- idrisCatch (runIO $ getModificationTime fn)
118 (\c -> runIO $ getIModTime src)
118 (\c -> runIO $ getIModTime src)
119− ok <- checkIBCUpToDate fn src
119+ -- FIXME: It's also not up to date if anything it imports has
120+ -- been modified since its own ibc has.
122+ -- Issue #1592 on the issue tracker.
124+ -- https://github.com/idris-lang/Idris-dev/issues/1592
125+ ibcOutdated <- fn `younger` (getSrcFile src)
126+ ibcValid <- hasValidIBCVersion fn
120− return [MTree (IBC fn src) ok mt ms]
127+ return [MTree (IBC fn src) (ibcOutdated || not ibcValid) mt ms]
122 getSrcFile (IBC _ src) = getSrcFile src
129 getSrcFile (IBC _ src) = getSrcFile src
123 getSrcFile (LIDR src) = src
130 getSrcFile (LIDR src) = src
124 getSrcFile (IDR src) = src
131 getSrcFile (IDR src) = src
126− -- FIXME: It's also not up to date if anything it imports has
127− -- been modified since its own ibc has.
129− -- Issue #1592 on the issue tracker.
131− -- https://github.com/idris-lang/Idris-dev/issues/1592
133− checkIBCUpToDate fn (LIDR src) = older fn src
134− checkIBCUpToDate fn (IDR src) = older fn src
136− older ibc src = do exist <- runIO $ doesFileExist src
133+ younger ibc src = do exist <- runIO $ doesFileExist src
137− if exist then do
134+ if exist then do
138− ibct <- runIO $ getModificationTime ibc
135+ ibct <- runIO $ getModificationTime ibc
139− srct <- runIO $ getModificationTime src
136+ srct <- runIO $ getModificationTime src
140− return (srct >= ibct)
137+ return (srct > ibct)
141− else return False
138+ else return False
143 children :: Bool -> FilePath -> [FilePath] -> Idris [ModuleTree]
140 children :: Bool -> FilePath -> [FilePath] -> Idris [ModuleTree]
144 children lit f done = -- idrisCatch
141 children lit f done = -- idrisCatch