From 33cec4c92c1608c9b907aaf2422f87b06039ebbd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Sep 2014 12:29:44 -0400 Subject: Fix build with optparse-applicative 0.10. Closes: #761484 This also works with 0.9, and probably 0.8. --- Test.hs | 10 ++-------- debian/changelog | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Test.hs b/Test.hs index 9a34835cc..9a716e8ff 100644 --- a/Test.hs +++ b/Test.hs @@ -17,9 +17,6 @@ import Test.Tasty.Ingredients.Rerun import Data.Monoid import Options.Applicative hiding (command) -#if MIN_VERSION_optparse_applicative(0,8,0) -import qualified Options.Applicative.Types as Opt -#endif import qualified Data.Map as M import qualified Text.JSON @@ -115,16 +112,13 @@ main ps = do exitFailure ) where - progdesc = "git-annex test" parseOpts pprefs pinfo args = #if MIN_VERSION_optparse_applicative(0,8,0) - pure $ case execParserPure pprefs pinfo args of - Opt.Success v -> v - Opt.Failure f -> error $ fst $ Opt.execFailure f progdesc - Opt.CompletionInvoked _ -> error "completion not supported" + handleParseResult $ execParserPure pprefs pinfo args #else either (error <=< flip errMessage progdesc) return $ execParserPure pprefs pinfo args + progdesc = "git-annex test" #endif ingredients :: [Ingredient] diff --git a/debian/changelog b/debian/changelog index c2e0ea508..aa7fd6dd6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,7 @@ git-annex (5.20140832) UNRELEASED; urgency=medium be using a better backend. * Rather than crashing when there's a problem with the requested bloomfilter capacity/accuracy, fall back to a reasonable default bloom filter size. + * Fix build with optparse-applicative 0.10. Closes: #761484 -- Joey Hess Thu, 04 Sep 2014 16:17:22 -0400 -- cgit v1.2.3