File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 -> m ()
3636clean (CleanTargets targets) =
3737 cleanup targets False
38- clean ( CleanFull _ ) =
38+ clean CleanFull =
3939 cleanup [] True
4040
4141cleanup
@@ -63,12 +63,11 @@ cleanup targets doFullClean = do
6363 pkgs -> throwM (NonLocalPackages pkgs)
6464
6565-- | Options for cleaning a project.
66- data CleanOpts = CleanTargets
67- { cleanOptsTargets :: [PackageName ]
66+ data CleanOpts
67+ = CleanTargets [PackageName ]
6868 -- ^ Names of the packages to clean.
6969 -- If the list is empty, every local package should be cleaned.
70- }
71- | CleanFull { cleanOptsFull :: Bool }
70+ | CleanFull
7271
7372-- | Exceptions during cleanup.
7473newtype StackCleanException
Original file line number Diff line number Diff line change @@ -185,15 +185,16 @@ readFlag = do
185185
186186-- | Command-line parser for the clean command.
187187cleanOptsParser :: Parser CleanOpts
188- cleanOptsParser = CleanTargets <$> packages <|> CleanFull <$> doFullClean
188+ cleanOptsParser = CleanTargets <$> packages <|> doFullClean
189189 where
190190 packages =
191191 many
192192 (packageNameArgument
193193 (metavar " PACKAGE" <>
194194 help " If none specified, clean all local packages" ))
195195 doFullClean =
196- switch
196+ flag'
197+ CleanFull
197198 (long " full" <>
198199 help " Remove whole the work dir, default is .stack-work" )
199200
You can’t perform that action at this time.
0 commit comments