@@ -258,8 +258,14 @@ ibc i (IBCParsedRegion fc) f = return f { ibc_parsedSpan = Just fc }
258process :: Bool -- ^ Reexporting
258process :: Bool -- ^ Reexporting
259 -> IBCFile -> FilePath -> Idris ()
259 -> IBCFile -> FilePath -> Idris ()
260process reexp i fn
260process reexp i fn
261+ | ver i /= ibcVersion
261− | ver i /= ibcVersion = do iLOG "ibc out of date"
262+ = do iLOG "ibc out of date"
263+ let e = if ver i < ibcVersion then " an earlier " else " a later "
264+ ifail $ "Incompatible ibc version.\nThis library was built with"
265+ ++ e ++ "version of Idris.\n" ++
266+ "Please clean and rebuild."
262− ifail "Incorrect ibc version --- please rebuild"
268+ --- please rebuild"
263 | otherwise =
269 | otherwise =
264 do srcok <- runIO $ doesFileExist (sourcefile i)
270 do srcok <- runIO $ doesFileExist (sourcefile i)
265 when srcok $ timestampOlder (sourcefile i) fn
271 when srcok $ timestampOlder (sourcefile i) fn