From 523f2f57e11c16ff01ae2614321baccb4ab876c4 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 24 Sep 2021 20:49:03 +0200 Subject: [PATCH] Fix `ghcup list -t` for hls/stack, fixes #244 --- app/ghcup/Main.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/ghcup/Main.hs b/app/ghcup/Main.hs index 48b326d..bdf0f6e 100644 --- a/app/ghcup/Main.hs +++ b/app/ghcup/Main.hs @@ -824,7 +824,7 @@ listOpts = <$> optional (option (eitherReader toolParser) - (short 't' <> long "tool" <> metavar "" <> help + (short 't' <> long "tool" <> metavar "" <> help "Tool to list versions for. Default is all" ) ) @@ -1429,6 +1429,8 @@ toolVersionEither s' = toolParser :: String -> Either String Tool toolParser s' | t == T.pack "ghc" = Right GHC | t == T.pack "cabal" = Right Cabal + | t == T.pack "hls" = Right HLS + | t == T.pack "stack" = Right Stack | otherwise = Left ("Unknown tool: " <> s') where t = T.toLower (T.pack s')