@@ -73,7 +73,7 @@ instance Exception LsException where
7373
7474-- | Type representing command line options for the @stack ls@ command.
7575newtype LsCmdOpts
76- = LsCmdOpts { lsView :: LsCmds }
76+ = LsCmdOpts { lsCmds :: LsCmds }
7777
7878-- | Type representing subcommands for the @stack ls@ command.
7979data LsCmds
@@ -143,7 +143,7 @@ data ListStylesOpts = ListStylesOpts
143143
144144-- | Type representing command line options for the @stack ls tools@ command.
145145newtype ListToolsOpts
146- = ListToolsOpts { toptFilter :: String }
146+ = ListToolsOpts { filter :: String }
147147
148148data Snapshot = Snapshot
149149 { snapId :: Text
@@ -236,7 +236,7 @@ handleLocal lsOpts = do
236236 | otherwise = parent parentInstRoot
237237 snapData' <- liftIO $ listDirectory $ toFilePath snapRootDir
238238 let snapData = L. sort snapData'
239- case lsOpts. lsView of
239+ case lsOpts. lsCmds of
240240 LsSnapshot sopt ->
241241 case (sopt. ltsSnapView, sopt. nightlySnapView) of
242242 (True , False ) ->
@@ -259,7 +259,7 @@ handleRemote lsOpts = do
259259 let req' = addRequestHeader hAccept " application/json" req
260260 result <- httpJSON req'
261261 let snapData = getResponseBody result
262- case lsOpts. lsView of
262+ case lsOpts. lsCmds of
263263 LsSnapshot sopt ->
264264 case (sopt. ltsSnapView, sopt. nightlySnapView) of
265265 (True , False ) ->
@@ -279,7 +279,7 @@ handleRemote lsOpts = do
279279
280280lsCmd :: LsCmdOpts -> RIO Runner ()
281281lsCmd lsOpts =
282- case lsOpts. lsView of
282+ case lsOpts. lsCmds of
283283 LsSnapshot sopt ->
284284 case sopt. viewType of
285285 Local -> handleLocal lsOpts
@@ -320,7 +320,7 @@ listToolsCmd :: ListToolsOpts -> RIO Config ()
320320listToolsCmd opts = do
321321 localPrograms <- view $ configL . to (. localPrograms)
322322 installed <- sort <$> listInstalled localPrograms
323- let wanted = case opts. toptFilter of
323+ let wanted = case opts. filter of
324324 [] -> installed
325325 " ghc-git" -> [t | t@ (ToolGhcGit _ _) <- installed]
326326 pkgName -> filtered pkgName installed
0 commit comments