From 93138a50bb4726ee89cc4801e46f328bb2d748cd Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Thu, 12 Jan 2017 20:31:07 +0200 Subject: [PATCH] Update 5.6.0.0 to work with latest optparse-applicative And ghc-8.0.2 --- ghc-mod.cabal | 13 +++++++------ src/GHCMod/Options/Commands.hs | 5 +++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ghc-mod.cabal b/ghc-mod.cabal index 2964579..b909a42 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -1,5 +1,5 @@ Name: ghc-mod -Version: 5.6.0.0 +Version: 5.7.0.0 Author: Kazu Yamamoto , Daniel Gröber , Alejandro Serrano , @@ -177,7 +177,7 @@ Library , containers < 0.6 , cabal-helper < 0.8 && >= 0.7.1.0 , deepseq < 1.5 - , directory < 1.3 + , directory < 1.4 , filepath < 1.5 , ghc < 8.2 && >= 7.6 , ghc-paths < 0.2 @@ -202,7 +202,7 @@ Library , extra == 1.4.* , pipes == 4.1.* , safe < 0.4 && >= 0.3.9 - , optparse-applicative >=0.11.0 && <0.13.0 + , optparse-applicative >=0.13.0 && <0.14.0 , template-haskell , syb if impl(ghc < 7.8) @@ -222,7 +222,7 @@ Executable ghc-mod Default-Extensions: ConstraintKinds, FlexibleContexts HS-Source-Dirs: src Build-Depends: base < 5 && >= 4.0 - , directory < 1.3 + , directory < 1.4 , filepath < 1.5 , pretty < 1.2 , process < 1.5 @@ -231,7 +231,8 @@ Executable ghc-mod , ghc < 8.1 , monad-control ==1.0.* , fclabels ==2.0.* - , optparse-applicative >=0.11.0 && <0.13.0 + , optparse-applicative >=0.13.0 && <0.14.0 + , semigroups < 0.19 && >= 0.10.0 , ghc-mod Executable ghc-modi @@ -247,7 +248,7 @@ Executable ghc-modi Build-Depends: base < 5 && >= 4.0 , binary < 0.9 && >= 0.5.1.0 , deepseq < 1.5 - , directory < 1.3 + , directory < 1.4 , filepath < 1.5 , process < 1.5 , old-time < 1.2 diff --git a/src/GHCMod/Options/Commands.hs b/src/GHCMod/Options/Commands.hs index 688905f..9a486ac 100644 --- a/src/GHCMod/Options/Commands.hs +++ b/src/GHCMod/Options/Commands.hs @@ -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 }