"doc" command.
This commit is contained in:
parent
657a007b47
commit
7ccb4ab045
@ -34,8 +34,9 @@ usage = "ghc-mod version " ++ showVersion version ++ "\n"
|
|||||||
++ "\t ghc-mod info" ++ ghcOptHelp ++ "<HaskellFile> <module> <expression>\n"
|
++ "\t ghc-mod info" ++ ghcOptHelp ++ "<HaskellFile> <module> <expression>\n"
|
||||||
++ "\t ghc-mod type" ++ ghcOptHelp ++ "<HaskellFile> <module> <line-no> <column-no>\n"
|
++ "\t ghc-mod type" ++ ghcOptHelp ++ "<HaskellFile> <module> <line-no> <column-no>\n"
|
||||||
++ "\t ghc-mod lint [-h opt] <HaskellFile>\n"
|
++ "\t ghc-mod lint [-h opt] <HaskellFile>\n"
|
||||||
++ "\t ghc-mod boot\n"
|
|
||||||
++ "\t ghc-mod root <HaskellFile>\n"
|
++ "\t ghc-mod root <HaskellFile>\n"
|
||||||
|
++ "\t ghc-mod doc <HaskellFile>\n"
|
||||||
|
++ "\t ghc-mod boot\n"
|
||||||
++ "\t ghc-mod help\n"
|
++ "\t ghc-mod help\n"
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
@ -103,17 +104,18 @@ main = flip E.catches handlers $ do
|
|||||||
then f
|
then f
|
||||||
else E.throw (TooManyArguments cmdArg0)
|
else E.throw (TooManyArguments cmdArg0)
|
||||||
res <- case cmdArg0 of
|
res <- case cmdArg0 of
|
||||||
"browse" -> concat <$> mapM (browseModule opt cradle) remainingArgs
|
|
||||||
"list" -> listModules opt cradle
|
"list" -> listModules opt cradle
|
||||||
|
"lang" -> listLanguages opt
|
||||||
|
"flag" -> listFlags opt
|
||||||
|
"browse" -> concat <$> mapM (browseModule opt cradle) remainingArgs
|
||||||
"check" -> checkSyntax opt cradle remainingArgs
|
"check" -> checkSyntax opt cradle remainingArgs
|
||||||
"expand" -> checkSyntax opt { expandSplice = True } cradle remainingArgs
|
"expand" -> checkSyntax opt { expandSplice = True } cradle remainingArgs
|
||||||
"debug" -> nArgs 1 $ debugInfo opt cradle cmdArg1
|
"debug" -> nArgs 1 $ debugInfo opt cradle cmdArg1
|
||||||
"root" -> nArgs 1 $ rootInfo opt cradle cmdArg1
|
|
||||||
"type" -> nArgs 4 $ typeExpr opt cradle cmdArg1 cmdArg2 (read cmdArg3) (read cmdArg4)
|
|
||||||
"info" -> nArgs 3 infoExpr opt cradle cmdArg1 cmdArg2 cmdArg3
|
"info" -> nArgs 3 infoExpr opt cradle cmdArg1 cmdArg2 cmdArg3
|
||||||
|
"type" -> nArgs 4 $ typeExpr opt cradle cmdArg1 cmdArg2 (read cmdArg3) (read cmdArg4)
|
||||||
"lint" -> nArgs 1 withFile (lintSyntax opt) cmdArg1
|
"lint" -> nArgs 1 withFile (lintSyntax opt) cmdArg1
|
||||||
"lang" -> listLanguages opt
|
"root" -> nArgs 1 $ rootInfo opt cradle cmdArg1
|
||||||
"flag" -> listFlags opt
|
"doc" -> nArgs 1 $ packageDoc opt cradle cmdArg1
|
||||||
"boot" -> do
|
"boot" -> do
|
||||||
mods <- listModules opt cradle
|
mods <- listModules opt cradle
|
||||||
langs <- listLanguages opt
|
langs <- listLanguages opt
|
||||||
|
Loading…
Reference in New Issue
Block a user