hlint options can be specified from ghc-hlint-options.

This commit is contained in:
Kazu Yamamoto
2010-06-14 11:56:35 +09:00
parent da8975c03f
commit f30eb343b0
5 changed files with 25 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ usage = "ghc-mod version 0.4.2\n"
++ "\t ghc-mod lang\n"
++ "\t ghc-mod browse <module> [<module> ...]\n"
++ "\t ghc-mod check <HaskellFile>\n"
++ "\t ghc-mod lint <HaskellFile>\n"
++ "\t ghc-mod [-h opt] lint <HaskellFile>\n"
++ "\t ghc-mod boot\n"
++ "\t ghc-mod help\n"
@@ -31,12 +31,16 @@ usage = "ghc-mod version 0.4.2\n"
defaultOptions :: Options
defaultOptions = Options {
convert = toPlain
, hlintOpts = []
}
argspec :: [OptDescr (Options -> Options)]
argspec = [ Option "l" ["tolisp"]
(NoArg (\opts -> opts { convert = toLisp }))
"print as a list of Lisp"
, Option "h" ["hlintOpt"]
(ReqArg (\h opts -> opts { hlintOpts = h : hlintOpts opts }) "hlintOpt")
"hint to be ignored"
]
parseArgs :: [OptDescr (Options -> Options)] -> [String] -> (Options, [String])