diff options
Diffstat (limited to 'src-3.0/GF/Command/Abstract.hs')
| -rw-r--r-- | src-3.0/GF/Command/Abstract.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src-3.0/GF/Command/Abstract.hs b/src-3.0/GF/Command/Abstract.hs index 2b9ce5d1d..8643a649f 100644 --- a/src-3.0/GF/Command/Abstract.hs +++ b/src-3.0/GF/Command/Abstract.hs @@ -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 |
