on master help sign in
Fix building with optparse-applicative-0.13.0

In #3445 I widened the bound on optparse-applicative to include version 0.13. Since I only widened it on the library and not the test suite, so long as the test suite was turned on cabal-install always selected 0.12 which allowed build failures to pass undetected. This commit fixes them with some CPP.

commit4b21a5757f7d131ebbf65e03885eb4f0c406f30e authorEcho Nolan <echo@echonolan.net> dateTue 25 Oct 2016, 17:01 (10 years ago) parentbb3bc16
3 files changed+9−1
idris.cabal+1−1 src/Idris/CmdOptions.hs+4 test/TestRun.hs+4
idris.cabal+1−1
@@ -362,7 +362,7 @@ Test-suite regression-and-feature-tests
362362 , filepath
363363 , directory
364364 , haskeline >= 0.7
365− , optparse-applicative >= 0.11 && < 0.13
365+ , optparse-applicative >= 0.11 && < 0.14
366366 , tagged
367367 , tasty >= 0.8
368368 , tasty-golden >= 2.0
src/Idris/CmdOptions.hs+4
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-|
23Module : Idris.CmdOptions
34Description : A parser for the CmdOptions for the Idris executable.
@@ -26,6 +27,9 @@ import Control.Monad.Trans.Except (throwE)
2627import Control.Monad.Trans.Reader (ask)
2728import Data.Char
2829import Data.Maybe
30+#if MIN_VERSION_optparse_applicative(0,13,0)
31+import Data.Monoid ((<>))
32+#endif
2933import Options.Applicative
3034import Options.Applicative.Arrows
3135import Options.Applicative.Types (ReadM(..))
test/TestRun.hs+4
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12module Main where
23
34import TestData
@@ -6,6 +7,9 @@ import Control.Monad
67import Data.Char (isLetter)
78import qualified Data.IntMap as IMap
89import Data.List
10+#if MIN_VERSION_optparse_applicative(0,13,0)
11+import Data.Monoid ((<>))
12+#endif
913import Data.Proxy
1014import Data.Typeable
1115import Options.Applicative