Skip to content
Snippets Groups Projects
Commit d26ddf70 authored by Arjun Kathuria's avatar Arjun Kathuria :rocket:
Browse files

adds rudimentary ghcup bin removal code. TODO: handle windows.

parent 95150654
No related branches found
No related tags found
1 merge request!101[WIP] Feature "nuke"
...@@ -1282,6 +1282,17 @@ rmStackVer ver = do ...@@ -1282,6 +1282,17 @@ rmStackVer ver = do
Nothing -> liftIO $ rmLink (binDir </> "stack" <> exeExt) Nothing -> liftIO $ rmLink (binDir </> "stack" <> exeExt)
-- assuming the current scheme of having just 1 ghcup bin, no version info is required.
rmGhcup :: ( MonadReader AppState m
, MonadIO m
)
=> Excepts '[NotInstalled] m ()
rmGhcup = do
AppState {dirs = Dirs {binDir}} <- lift ask
let ghcupFile = "ghcup" <> exeExt
liftIO $ hideError doesNotExistErrorType $ rmFile (binDir </> ghcupFile)
rmTool :: ( MonadReader AppState m rmTool :: ( MonadReader AppState m
, MonadLogger m , MonadLogger m
, MonadFail m , MonadFail m
...@@ -1308,8 +1319,7 @@ rmTool ListResult {lVer, lTool, lCross} = do ...@@ -1308,8 +1319,7 @@ rmTool ListResult {lVer, lTool, lCross} = do
rmStackVer lVer rmStackVer lVer
GHCup -> do GHCup -> do
-- leaving this unimplemented for now. rmGhcup
pure ()
rmGhcupDirs :: ( MonadReader AppState m rmGhcupDirs :: ( MonadReader AppState m
, MonadIO m , MonadIO m
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment