Changeset 3372 for src/Pugs/Run/Args.hs

Show
Ignore:
Timestamp:
05/18/05 02:43:25 (4 years ago)
Author:
theorbtwo
svk:copy_cache_prev:
4945
Message:

More signatures, a few more haddocks.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Run/Args.hs

    r3207 r3372  
    6767    | otherwise = ['-':opt] 
    6868 
     69-- | List of options with long and sort variants, as tupples of long, short (with the dashes). 
     70longOptions :: [(String, String)] 
    6971longOptions = [("--help", "-h"), ("--version", "-v")] 
     72 
     73-- | List of options that can have their argument just after, with no space. 
     74composable :: [Char] 
    7075composable = "cdlnpw" 
     76 
     77-- | List of options that can take arguments 
     78withParam :: [String] 
    7179withParam = words "e C B I M V:" 
     80 
     81prefixOpt :: [Char] -> Maybe (String, String) 
    7282prefixOpt opt = msum $ map (findArg opt) withParam 
     83 
     84findArg :: Eq a => [a] -> [a] -> Maybe ([a], [a]) 
    7385findArg arg prefix = do 
    7486    param <- afterPrefix prefix arg 
     
    90102-} 
    91103 
     104compareArgs :: Arg -> Arg -> Ordering 
    92105compareArgs a b = compare (argRank a) (argRank b) 
    93106