forked from commercialhaskell/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCleanParser.hs
More file actions
22 lines (20 loc) · 747 Bytes
/
CleanParser.hs
File metadata and controls
22 lines (20 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# LANGUAGE NoImplicitPrelude #-}
module Stack.Options.CleanParser where
import Options.Applicative
import Stack.Clean (CleanOpts (..))
import Stack.Prelude
import Stack.Types.PackageName
-- | Command-line parser for the clean command.
cleanOptsParser :: Parser CleanOpts
cleanOptsParser = CleanShallow <$> packages <|> doFullClean
where
packages =
many
(packageNameArgument
(metavar "PACKAGE" <>
help "If none specified, clean all local packages"))
doFullClean =
flag'
CleanFull
(long "full" <>
help "Delete all work directories (.stack-work by default) in the project")