on master help sign in
Merge pull request #3100 from jfdm/say-what-needs-reloading

Fixes #3023 with improved error message.

commit1cd27e61b9253870e16744c67587c78a3adb37e8 authorJan de Muijnck-Hughes <jfdm@users.noreply.github.com> dateWed 13 Apr 2016, 12:29 (11 years ago) parent6c5b2e3ad138e2
1 file changed+11−5
src/Idris/IBC.hs+11−5
src/Idris/IBC.hs+11−5
@@ -394,11 +394,17 @@ process reexp phase archive fn = do
394394 processAccess reexp phase archive
395395
396396timestampOlder :: FilePath -> FilePath -> Idris ()
397−timestampOlder src ibc = do srct <- runIO $ getModificationTime src
398− ibct <- runIO $ getModificationTime ibc
399− if (srct > ibct)
400− then ifail $ "Needs reloading " ++ show (srct, ibct)
401− else return ()
397+timestampOlder src ibc = do
398+ srct <- runIO $ getModificationTime src
399+ ibct <- runIO $ getModificationTime ibc
400+ if (srct > ibct)
401+ then ifail $ unlines [ "Module needs reloading:"
402+ , unwords ["\tSRC :", show src]
403+ , unwords ["\tModified at:", show srct]
404+ , unwords ["\tIBC :", show src]
405+ , unwords ["\tModified at:", show srct]
406+ ]
407+ else return ()
402408
403409processPostulates :: Archive -> Idris ()
404410processPostulates ar = do