Do not use deprecated API for parseCmdLineOptions
Thanks to @lierdakil
This commit is contained in:
parent
4aef60940e
commit
45eb3b8d4c
@ -35,18 +35,7 @@ import Language.Haskell.GhcMod.Options.Help
|
|||||||
-- | Parse a set of arguments according to the ghc-mod CLI flag spec, producing
|
-- | Parse a set of arguments according to the ghc-mod CLI flag spec, producing
|
||||||
-- @Options@ set accordingly.
|
-- @Options@ set accordingly.
|
||||||
parseCmdLineOptions :: [String] -> Maybe Options
|
parseCmdLineOptions :: [String] -> Maybe Options
|
||||||
parseCmdLineOptions args = execParserMaybe parserInfo args
|
parseCmdLineOptions = getParseResult . execParserPure (prefs mempty) (info globalArgSpec mempty)
|
||||||
where
|
|
||||||
parserInfo
|
|
||||||
= ParserInfo
|
|
||||||
{ infoParser = globalArgSpec
|
|
||||||
, infoFullDesc = True
|
|
||||||
, infoProgDesc = Chunk Nothing
|
|
||||||
, infoHeader = Chunk Nothing
|
|
||||||
, infoFooter = Chunk Nothing
|
|
||||||
, infoFailureCode = -1
|
|
||||||
, infoIntersperse = True
|
|
||||||
}
|
|
||||||
|
|
||||||
splitOn :: Eq a => a -> [a] -> ([a], [a])
|
splitOn :: Eq a => a -> [a] -> ([a], [a])
|
||||||
splitOn c = second (drop 1) . break (==c)
|
splitOn c = second (drop 1) . break (==c)
|
||||||
|
Loading…
Reference in New Issue
Block a user