Skip to content

Commit

Permalink
Fix for pre-8.0 GHCs.
Browse files Browse the repository at this point in the history
This adds a semigroups dependency, which might be annoyingly heavy;
the alternative is more CPP.
  • Loading branch information
quasicomputational committed Feb 9, 2018
1 parent 8706175 commit 8ad13d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion doctest.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--
-- see: https://github.com/sol/hpack
--
-- hash: 65d4f9a2ccf1a31ae95a19e970e90bad28f12dcbbfca47bb02089ea58d78b696
-- hash: 7ba3485a48f328a133e6770af202d9940cefa72c268fddf5af01b37f38c4d42c

name: doctest
version: 0.14.0
Expand Down Expand Up @@ -66,6 +66,7 @@ library
, ghc >=7.0 && <8.6
, ghc-paths >=0.1.0.9
, process
, semigroups
, syb >=0.3
, transformers
default-language: Haskell2010
Expand All @@ -88,6 +89,7 @@ executable doctest
, ghc >=7.0 && <8.6
, ghc-paths >=0.1.0.9
, process
, semigroups
, syb >=0.3
, transformers
default-language: Haskell2010
Expand All @@ -109,6 +111,7 @@ test-suite doctests
, ghc >=7.0 && <8.6
, ghc-paths >=0.1.0.9
, process
, semigroups
, syb >=0.3
, transformers
default-language: Haskell2010
Expand Down Expand Up @@ -169,6 +172,7 @@ test-suite spec
, hspec >=1.5.1
, mockery
, process
, semigroups
, setenv
, silently >=1.2.4
, stringbuilder >=0.4
Expand Down
1 change: 1 addition & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
- filepath
- process
- ghc-paths >= 0.1.0.9
- semigroups
- transformers

library:
Expand Down
7 changes: 4 additions & 3 deletions src/Runner.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ module Runner (
import Prelude hiding (putStr, putStrLn, error)

#if __GLASGOW_HASKELL__ < 710
import Data.Monoid
import Data.Monoid hiding ((<>))
import Control.Applicative
#else
import Data.Semigroup
#endif
#if !MIN_VERSION_base(4,11,0)
import Data.Semigroup
#endif

import Control.Monad hiding (forM_)
Expand Down

0 comments on commit 8ad13d8

Please sign in to comment.