hs-cli
hs-cli copied to clipboard
FlagShort doesn't accept a value with '='
Example:
import Console.Options
import Data.Char (isDigit)
import Data.Monoid
data MyADT = A | B | C
deriving (Show,Eq)
main = defaultMain $ do
nameFlag <- flagParam (FlagShort 'n' <> FlagLong "name" <> FlagDescription "name of something")
(FlagRequired $ \s -> Right s)
command "sample" $ do
action $ \toParam -> do
putStrLn $ show $ toParam nameFlag
stack run -- sample -n=n
outputs
Nothing
whereas FlagLong parses "n" as a value
version 0.2.0