Commit add5179d authored by Michael Hanus 's avatar Michael Hanus

Bug fix in cleanup code

parent dc59ea45
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--- (together with possible preconditions). --- (together with possible preconditions).
--- ---
--- @author Michael Hanus, Jan-Patrick Baye --- @author Michael Hanus, Jan-Patrick Baye
--- @version June 2018 --- @version August 2018
------------------------------------------------------------------------- -------------------------------------------------------------------------
import AnsiCodes import AnsiCodes
...@@ -56,7 +56,7 @@ ccBanner :: String ...@@ -56,7 +56,7 @@ ccBanner :: String
ccBanner = unlines [bannerLine,bannerText,bannerLine] ccBanner = unlines [bannerLine,bannerText,bannerLine]
where where
bannerText = "CurryCheck: a tool for testing Curry programs (Version " ++ bannerText = "CurryCheck: a tool for testing Curry programs (Version " ++
packageVersion ++ " of 08/06/2018)" packageVersion ++ " of 24/08/2018)"
bannerLine = take (length bannerText) (repeat '-') bannerLine = take (length bannerText) (repeat '-')
-- Help text -- Help text
...@@ -1284,12 +1284,13 @@ cleanup opts mainmod modules = ...@@ -1284,12 +1284,13 @@ cleanup opts mainmod modules =
removeCurryModule mainmod removeCurryModule mainmod
mapIO_ removeCurryModule (map testModuleName modules) mapIO_ removeCurryModule (map testModuleName modules)
where where
removeCurryModule modname = do removeCurryModule modname =
(_,srcfilename) <- lookupModuleSourceInLoadPath modname >>= lookupModuleSourceInLoadPath modname >>=
return . maybe done
maybe (error $ "Source file of module '"++modname++"' not found!") id (\ (_,srcfilename) -> do
system $ installDir </> "bin" </> "cleancurry" ++ " " ++ modname system $ installDir </> "bin" </> "cleancurry" ++ " " ++ modname
system $ "rm -f " ++ srcfilename system $ "rm -f " ++ srcfilename
done )
-- Show some statistics about number of tests: -- Show some statistics about number of tests:
showTestStatistics :: Options -> [Test] -> String showTestStatistics :: Options -> [Test] -> String
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment