Merge branch 'improve-hls-compile-help'
This commit is contained in:
commit
a67b3e8a57
@ -89,18 +89,6 @@ toolVersionArgument criteria tool =
|
|||||||
mv _ = "VERSION|TAG"
|
mv _ = "VERSION|TAG"
|
||||||
|
|
||||||
|
|
||||||
toolVersionOption :: Maybe ListCriteria -> Maybe Tool -> Parser ToolVersion
|
|
||||||
toolVersionOption criteria tool =
|
|
||||||
option (eitherReader toolVersionEither)
|
|
||||||
( sh tool
|
|
||||||
<> completer (tagCompleter (fromMaybe GHC tool) [])
|
|
||||||
<> foldMap (completer . versionCompleter criteria) tool)
|
|
||||||
where
|
|
||||||
sh (Just GHC) = long "ghc" <> metavar "GHC_VERSION|TAG"
|
|
||||||
sh (Just HLS) = long "hls" <> metavar "HLS_VERSION|TAG"
|
|
||||||
sh _ = long "version" <> metavar "VERSION|TAG"
|
|
||||||
|
|
||||||
|
|
||||||
versionParser :: Parser GHCTargetVersion
|
versionParser :: Parser GHCTargetVersion
|
||||||
versionParser = option
|
versionParser = option
|
||||||
(eitherReader tVersionEither)
|
(eitherReader tVersionEither)
|
||||||
|
@ -340,7 +340,12 @@ hlsCompileOpts =
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
<*> some (toolVersionOption Nothing (Just GHC))
|
<*> some (
|
||||||
|
option (eitherReader toolVersionEither)
|
||||||
|
( long "ghc" <> metavar "GHC_VERSION|TAG" <> help "For which GHC version to compile for (can be specified multiple times)"
|
||||||
|
<> completer (tagCompleter GHC [])
|
||||||
|
<> completer (versionCompleter Nothing GHC))
|
||||||
|
)
|
||||||
<*> many (argument str (metavar "CABAL_ARGS" <> help "Additional arguments to cabal install, prefix with '-- ' (longopts)"))
|
<*> many (argument str (metavar "CABAL_ARGS" <> help "Additional arguments to cabal install, prefix with '-- ' (longopts)"))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user