system command pipes (sp)

This commit is contained in:
aarne
2008-06-18 16:26:12 +00:00
parent 8e5b78f886
commit 944eea8de9
4 changed files with 39 additions and 7 deletions

View File

@@ -20,6 +20,7 @@ data Option
data Value
= VId Ident
| VInt Integer
| VStr String
deriving (Eq,Ord,Show)
data Argument
@@ -38,6 +39,11 @@ valIntOpts flag def opts = fromInteger $ case valOpts flag (VInt def) opts of
VInt v -> v
_ -> def
valStrOpts :: String -> String -> [Option] -> String
valStrOpts flag def opts = case valOpts flag (VStr def) opts of
VStr v -> v
_ -> def
valOpts :: String -> Value -> [Option] -> Value
valOpts flag def opts = case lookup flag flags of
Just v -> v