diff options
| author | aarne <aarne@cs.chalmers.se> | 2009-03-18 12:49:46 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2009-03-18 12:49:46 +0000 |
| commit | ba2c0a7b02832dd289e2c0405b22a50631c3a9e8 (patch) | |
| tree | 8435668770c4a29035ff66aa5dcfe7b79bacd2e9 /src/GF/Command/Abstract.hs | |
| parent | 20d6d7372f0b3e83f484137a96c4bc4a51406787 (diff) | |
flag -env=quotes (and possible other flags) to restrict ps
Diffstat (limited to 'src/GF/Command/Abstract.hs')
| -rw-r--r-- | src/GF/Command/Abstract.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/GF/Command/Abstract.hs b/src/GF/Command/Abstract.hs index cf82e96c6..dff404194 100644 --- a/src/GF/Command/Abstract.hs +++ b/src/GF/Command/Abstract.hs @@ -56,6 +56,12 @@ isOpt o opts = elem o [x | OOpt x <- opts] isFlag :: String -> [Option] -> Bool isFlag o opts = elem o [x | OFlag x _ <- opts] +optsAndFlags :: [Option] -> ([Option],[Option]) +optsAndFlags = foldr add ([],[]) where + add o (os,fs) = case o of + OOpt _ -> (o:os,fs) + OFlag _ _ -> (os,o:fs) + prOpt :: Option -> String prOpt o = case o of OOpt i -> i |
