summaryrefslogtreecommitdiff
path: root/CmdLine/Option.hs
diff options
context:
space:
mode:
Diffstat (limited to 'CmdLine/Option.hs')
-rw-r--r--CmdLine/Option.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/CmdLine/Option.hs b/CmdLine/Option.hs
index 1b82dc83e..2d4e67fa3 100644
--- a/CmdLine/Option.hs
+++ b/CmdLine/Option.hs
@@ -10,6 +10,7 @@ module CmdLine.Option (
flagOption,
fieldOption,
optionName,
+ optionParam,
ArgDescr(..),
OptDescr(..),
) where
@@ -68,3 +69,6 @@ fieldOption short opt paramdesc description =
{- The flag or field name used for an option. -}
optionName :: Option -> String
optionName (Option _ o _ _) = Prelude.head o
+
+optionParam :: Option -> String
+optionParam o = "--" ++ optionName o