Simplify actualArgs

This commit is contained in:
Joseph C. Sible 2020-12-28 17:21:47 -05:00
parent 46f177b5be
commit 0607039d41
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ checkGetOpts str flags args f =
toTokens = map (T_Literal (Id 0)) . words
opts = fromMaybe [] $ f (toTokens str)
actualFlags = filter (not . null) $ map fst opts
actualArgs = map (\(_, (_, x)) -> onlyLiteralString x) $ filter (null . fst) opts
actualArgs = [onlyLiteralString x | ("", (_, x)) <- opts]
-- Short options
prop_checkGetOptsS1 = checkGetOpts "-f x" ["f"] [] $ getOpts (True, True) "f:" []