implement includes options for check

This commit is contained in:
Andrew Sackville-West
2011-08-02 11:18:07 -07:00
parent b09a8fb2ee
commit b6d99e279c
4 changed files with 21 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ usage = "ghc-mod version 0.6.0\n"
++ "\t ghc-mod list [-l]\n"
++ "\t ghc-mod lang [-l]\n"
++ "\t ghc-mod browse [-l] [-o] <module> [<module> ...]\n"
++ "\t ghc-mod check <HaskellFile>\n"
++ "\t ghc-mod check [-i inc] <HaskellFile>\n"
++ "\t ghc-mod type <HaskellFile> <module> <expression>\n"
++ "\t ghc-mod info <HaskellFile> <module> <expression>\n"
++ "\t ghc-mod lint [-h opt] <HaskellFile>\n"
@@ -39,6 +39,7 @@ defaultOptions :: Options
defaultOptions = Options {
convert = toPlain
, hlintOpts = []
, checkIncludes = []
, operators = False
, packageConfs = []
, useUserPackageConf = True
@@ -60,6 +61,9 @@ argspec = [ Option "l" ["tolisp"]
, Option "" ["no-user-package-conf"]
(NoArg (\opts -> opts{ useUserPackageConf = False }))
"do not read the user package database"
, Option "i" ["include"]
(ReqArg (\i opts -> opts{ checkIncludes = i : (checkIncludes opts)}) "include")
"directory to include in search for modules"
]
parseArgs :: [OptDescr (Options -> Options)] -> [String] -> (Options, [String])