Changeset 2750 for src/Pugs/Run

Show
Ignore:
Timestamp:
05/05/05 22:20:07 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
4271
Message:

* pugs -BParrot examples/mandel.p6

Files:
1 modified

Legend:

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

    r2078 r2750  
    5959longOptions = [("--help", "-h"), ("--version", "-v")] 
    6060composable = "cdlnpw" 
    61 withParam = ["e", "C", "I", "M", "V:"] 
     61withParam = words "e C B I M V:" 
    6262prefixOpt opt = msum $ map (findArg opt) withParam 
    6363findArg arg prefix = do 
     
    9393argRank(Switch 'c')         = 3 
    9494argRank(Opt "-C" _)         = 4 
     95argRank(Opt "-B" _)         = 4 
    9596argRank(Opt "--external" _) = 5 
    9697argRank(Opt "-M" _)         = 98 
     
    110111gatherArgs("-M":mod:rest)         = [Opt "-M" mod] ++ gatherArgs(rest) 
    111112gatherArgs("-C":backend:rest)     = [Opt "-C" backend] ++ gatherArgs(rest) 
     113gatherArgs("-B":backend:rest)     = [Opt "-B" backend] ++ gatherArgs(rest) 
    112114gatherArgs("-V:":item:rest)       = [Opt "-V:" item] ++ gatherArgs(rest) 
    113115gatherArgs(('-':[]):xs)           = [File "-"] ++ gatherArgs(xs)