Changeset 3372 for src/Pugs/Run/Args.hs
- Timestamp:
- 05/18/05 02:43:25 (4 years ago)
- svk:copy_cache_prev:
- 4945
- Files:
-
- 1 modified
-
src/Pugs/Run/Args.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Run/Args.hs
r3207 r3372 67 67 | otherwise = ['-':opt] 68 68 69 -- | List of options with long and sort variants, as tupples of long, short (with the dashes). 70 longOptions :: [(String, String)] 69 71 longOptions = [("--help", "-h"), ("--version", "-v")] 72 73 -- | List of options that can have their argument just after, with no space. 74 composable :: [Char] 70 75 composable = "cdlnpw" 76 77 -- | List of options that can take arguments 78 withParam :: [String] 71 79 withParam = words "e C B I M V:" 80 81 prefixOpt :: [Char] -> Maybe (String, String) 72 82 prefixOpt opt = msum $ map (findArg opt) withParam 83 84 findArg :: Eq a => [a] -> [a] -> Maybe ([a], [a]) 73 85 findArg arg prefix = do 74 86 param <- afterPrefix prefix arg … … 90 102 -} 91 103 104 compareArgs :: Arg -> Arg -> Ordering 92 105 compareArgs a b = compare (argRank a) (argRank b) 93 106
