packageClean' :: IDEPackage -> (Bool -> IDEAction) -> IDEAction
packageClean' package continuation = do
    prefs     <- readIDE prefs
    logLaunch <- getDefaultLogLaunch
    showDefaultLogLaunch'

    let dir = ipdPackageDir package
    useStack <- liftIO . doesFileExist $ dir </> "stack.yaml"
    runExternalTool' (__ "Cleaning")
                    (if useStack then "stack" else cabalCommand prefs)
                    ["clean"]
                    dir $ do
        mbLastOutput <- C.getZipSink $ const <$> C.ZipSink sinkLast <*> C.ZipSink (logOutput logLaunch)
        lift $ continuation (mbLastOutput == Just (ToolExit ExitSuccess))
packageClean' :: IDEPackage -> (Bool -> IDEAction) -> IDEAction
packageClean' package continuation = do
    prefs     <- readIDE prefs
    logLaunch <- getDefaultLogLaunch
    showDefaultLogLaunch'

    let dir = ipdPackageDir package
    useStack <- liftIO . doesFileExist $ dir </> "stack.yaml"
    runExternalTool' (__ "Cleaning")
                    (if useStack then "stack" else cabalCommand prefs)
                    ["clean"]
                    dir $ do
        mbLastOutput <- C.getZipSink $ const <$> C.ZipSink sinkLast <*> C.ZipSink (logOutput logLaunch)
        lift $ continuation (mbLastOutput == Just (ToolExit ExitSuccess))
packageClean' package continuation = do
    prefs     <- readIDE prefs
    logLaunch <- getDefaultLogLaunch
    showDefaultLogLaunch'

    let dir = ipdPackageDir package
    useStack <- liftIO . doesFileExist $ dir </> "stack.yaml"
    runExternalTool' (__ "Cleaning")
                    (if useStack then "stack" else cabalCommand prefs)
                    ["clean"]
                    dir $ do
        mbLastOutput <- C.getZipSink $ const <$> C.ZipSink sinkLast <*> C.ZipSink (logOutput logLaunch)
        lift $ continuation (mbLastOutput == Just (ToolExit ExitSuccess))