Changes to work with optparse-applicative 0.13.0.0
This commit is contained in:
parent
85d38f5bc1
commit
78e35d8a74
@ -201,7 +201,7 @@ Library
|
|||||||
, extra < 1.6 && >= 1.4
|
, extra < 1.6 && >= 1.4
|
||||||
, pipes < 4.4 && >= 4.1
|
, pipes < 4.4 && >= 4.1
|
||||||
, safe < 0.4 && >= 0.3.9
|
, safe < 0.4 && >= 0.3.9
|
||||||
, optparse-applicative <0.13.0 && >=0.11.0
|
, optparse-applicative <0.14.0 && >=0.13.0
|
||||||
, template-haskell
|
, template-haskell
|
||||||
if impl(ghc < 7.8)
|
if impl(ghc < 7.8)
|
||||||
Build-Depends: convertible < 1.2 && >= 1.1.0.0
|
Build-Depends: convertible < 1.2 && >= 1.1.0.0
|
||||||
@ -228,7 +228,7 @@ Executable ghc-mod
|
|||||||
, ghc < 8.2 && >= 7.6
|
, ghc < 8.2 && >= 7.6
|
||||||
, monad-control < 1.1 && >= 1
|
, monad-control < 1.1 && >= 1
|
||||||
, fclabels == 2.0.*
|
, fclabels == 2.0.*
|
||||||
, optparse-applicative >=0.11.0 && <0.13.0
|
, optparse-applicative >=0.13.0 && <0.14.0
|
||||||
, ghc-mod
|
, ghc-mod
|
||||||
|
|
||||||
Executable ghc-modi
|
Executable ghc-modi
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
module GHCMod.Options.Commands where
|
module GHCMod.Options.Commands where
|
||||||
|
|
||||||
|
import Data.Semigroup
|
||||||
import Options.Applicative
|
import Options.Applicative
|
||||||
import Options.Applicative.Types
|
import Options.Applicative.Types
|
||||||
import Options.Applicative.Builder.Internal
|
import Options.Applicative.Builder.Internal
|
||||||
@ -289,8 +290,8 @@ hsubparser' :: Mod CommandFields a -> Parser a
|
|||||||
hsubparser' m = mkParser d g rdr
|
hsubparser' m = mkParser d g rdr
|
||||||
where
|
where
|
||||||
Mod _ d g = m `mappend` metavar ""
|
Mod _ d g = m `mappend` metavar ""
|
||||||
(cmds, subs) = mkCommand m
|
(ms, cmds, subs) = mkCommand m
|
||||||
rdr = CmdReader cmds (fmap add_helper . subs)
|
rdr = CmdReader ms cmds (fmap add_helper . subs)
|
||||||
add_helper pinfo = pinfo
|
add_helper pinfo = pinfo
|
||||||
{ infoParser = infoParser pinfo <**> helper }
|
{ infoParser = infoParser pinfo <**> helper }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user