Skip to content

Commit

Permalink
Give up and hit the problematic Data.Monoid import with CPP.
Browse files Browse the repository at this point in the history
  • Loading branch information
quasicomputational committed Apr 26, 2018
1 parent 4d191df commit bf07ffc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cabal-install/tests/IntegrationTests2.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -48,7 +49,9 @@ import Distribution.ModuleName (ModuleName)
import Distribution.Verbosity
import Distribution.Text

import Data.Monoid (mempty, (<>))
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (mempty, mappend)
#endif
import Data.List (sort)
import Data.String (IsString(..))
import qualified Data.Map as Map
Expand Down Expand Up @@ -1388,14 +1391,14 @@ testBuildKeepGoing :: ProjectConfig -> Assertion
testBuildKeepGoing config = do
-- P is expected to fail, Q does not depend on P but without
-- parallel build and without keep-going then we don't build Q yet.
(plan1, res1) <- executePlan =<< planProject testdir (config <> keepGoing False)
(plan1, res1) <- executePlan =<< planProject testdir (config `mappend` keepGoing False)
(_, failure1) <- expectPackageFailed plan1 res1 "p-0.1"
expectBuildFailed failure1
_ <- expectPackageConfigured plan1 res1 "q-0.1"

-- With keep-going then we should go on to sucessfully build Q
(plan2, res2) <- executePlan
=<< planProject testdir (config <> keepGoing True)
=<< planProject testdir (config `mappend` keepGoing True)
(_, failure2) <- expectPackageFailed plan2 res2 "p-0.1"
expectBuildFailed failure2
_ <- expectPackageInstalled plan2 res2 "q-0.1"
Expand Down

0 comments on commit bf07ffc

Please sign in to comment.