Changes to work with optparse-applicative 0.13.0.0

This commit is contained in:
Alan Zimmerman 2017-01-12 15:19:17 +02:00
parent 85d38f5bc1
commit 78e35d8a74
2 changed files with 5 additions and 4 deletions

View File

@ -201,7 +201,7 @@ Library
, extra < 1.6 && >= 1.4
, pipes < 4.4 && >= 4.1
, safe < 0.4 && >= 0.3.9
, optparse-applicative <0.13.0 && >=0.11.0
, optparse-applicative <0.14.0 && >=0.13.0
, template-haskell
if impl(ghc < 7.8)
Build-Depends: convertible < 1.2 && >= 1.1.0.0
@ -228,7 +228,7 @@ Executable ghc-mod
, ghc < 8.2 && >= 7.6
, monad-control < 1.1 && >= 1
, fclabels == 2.0.*
, optparse-applicative >=0.11.0 && <0.13.0
, optparse-applicative >=0.13.0 && <0.14.0
, ghc-mod
Executable ghc-modi

View File

@ -18,6 +18,7 @@
module GHCMod.Options.Commands where
import Data.Semigroup
import Options.Applicative
import Options.Applicative.Types
import Options.Applicative.Builder.Internal
@ -289,8 +290,8 @@ hsubparser' :: Mod CommandFields a -> Parser a
hsubparser' m = mkParser d g rdr
where
Mod _ d g = m `mappend` metavar ""
(cmds, subs) = mkCommand m
rdr = CmdReader cmds (fmap add_helper . subs)
(ms, cmds, subs) = mkCommand m
rdr = CmdReader ms cmds (fmap add_helper . subs)
add_helper pinfo = pinfo
{ infoParser = infoParser pinfo <**> helper }