diff options
author | David Waern <david.waern@gmail.com> | 2012-04-02 01:05:47 +0200 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2012-04-02 01:05:47 +0200 |
commit | 4b82bad435e629c3cd65782c8ffb9bae8a7e16b4 (patch) | |
tree | 0cd22cdf721497454c10de78b37b2830d3901aea /src/Haddock/Options.hs | |
parent | 162364b177c3982c67c842d310aead45434a3760 (diff) | |
parent | 979ada5bc63cba38bf570f943a3666298879bdc9 (diff) |
Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4
Diffstat (limited to 'src/Haddock/Options.hs')
-rw-r--r-- | src/Haddock/Options.hs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Haddock/Options.hs b/src/Haddock/Options.hs index 537bffac..792c0be3 100644 --- a/src/Haddock/Options.hs +++ b/src/Haddock/Options.hs @@ -126,7 +126,7 @@ options backwardsCompat = Option ['t'] ["title"] (ReqArg Flag_Heading "TITLE") "page heading", Option ['q'] ["qual"] (ReqArg Flag_Qualification "QUAL") - "qualification of names, one of \n'none' (default), 'full', 'local'\nor 'relative'", + "qualification of names, one of \n'none' (default), 'full', 'local'\n'relative' or 'abbreviate'", Option ['?'] ["help"] (NoArg Flag_Help) "display this help and exit", Option ['V'] ["version"] (NoArg Flag_Version) @@ -232,13 +232,14 @@ optLaTeXStyle flags = optLast [ str | Flag_LaTeXStyle str <- flags ] qualification :: [Flag] -> Either String QualOption qualification flags = case map (map Char.toLower) [ str | Flag_Qualification str <- flags ] of - [] -> Right OptNoQual - ["none"] -> Right OptNoQual - ["full"] -> Right OptFullQual - ["local"] -> Right OptLocalQual - ["relative"] -> Right OptRelativeQual - [arg] -> Left $ "unknown qualification type " ++ show arg - _:_ -> Left "qualification option given multiple times" + [] -> Right OptNoQual + ["none"] -> Right OptNoQual + ["full"] -> Right OptFullQual + ["local"] -> Right OptLocalQual + ["relative"] -> Right OptRelativeQual + ["abbreviate"] -> Right OptAbbreviateQual + [arg] -> Left $ "unknown qualification type " ++ show arg + _:_ -> Left "qualification option given multiple times" verbosity :: [Flag] -> Verbosity |