From add5179d7c431f8a8a720ff6d4de228f866bb6b6 Mon Sep 17 00:00:00 2001 From: Michael Hanus Date: Fri, 24 Aug 2018 14:59:28 +0200 Subject: [PATCH] Bug fix in cleanup code --- src/CurryCheck.curry | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/CurryCheck.curry b/src/CurryCheck.curry index a1f102b..6cc36ed 100644 --- a/src/CurryCheck.curry +++ b/src/CurryCheck.curry @@ -14,7 +14,7 @@ --- (together with possible preconditions). --- --- @author Michael Hanus, Jan-Patrick Baye ---- @version June 2018 +--- @version August 2018 ------------------------------------------------------------------------- import AnsiCodes @@ -56,7 +56,7 @@ ccBanner :: String ccBanner = unlines [bannerLine,bannerText,bannerLine] where bannerText = "CurryCheck: a tool for testing Curry programs (Version " ++ - packageVersion ++ " of 08/06/2018)" + packageVersion ++ " of 24/08/2018)" bannerLine = take (length bannerText) (repeat '-') -- Help text @@ -1284,12 +1284,13 @@ cleanup opts mainmod modules = removeCurryModule mainmod mapIO_ removeCurryModule (map testModuleName modules) where - removeCurryModule modname = do - (_,srcfilename) <- lookupModuleSourceInLoadPath modname >>= - return . - maybe (error $ "Source file of module '"++modname++"' not found!") id - system $ installDir "bin" "cleancurry" ++ " " ++ modname - system $ "rm -f " ++ srcfilename + removeCurryModule modname = + lookupModuleSourceInLoadPath modname >>= + maybe done + (\ (_,srcfilename) -> do + system $ installDir "bin" "cleancurry" ++ " " ++ modname + system $ "rm -f " ++ srcfilename + done ) -- Show some statistics about number of tests: showTestStatistics :: Options -> [Test] -> String -- GitLab