diff --git a/.travis.yml b/.travis.yml index 2a25531..82d2cea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,6 @@ cache: matrix: include: - - env: CABALVER=1.24 GHCVER=7.8.4 - addons: {apt: {packages: [cabal-install-1.24,ghc-7.8.4],sources: [hvr-ghc]}} - env: CABALVER=1.24 GHCVER=7.10.3 addons: {apt: {packages: [cabal-install-1.24,ghc-7.10.3],sources: [hvr-ghc]}} - env: CABALVER=1.24 GHCVER=8.0.2 @@ -18,9 +16,6 @@ matrix: - env: CABALVER=1.24 GHCVER=8.2.1 addons: {apt: {packages: [cabal-install-1.24,ghc-8.2.1], sources: [hvr-ghc]}} - allow_failures: - - env: CABALVER=1.24 GHCVER=7.8.4 - before_install: - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH @@ -28,22 +23,13 @@ install: - cabal --version - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" - travis_retry cabal update - - case "$GHCVER" in - "7.8.4") cabal install --only-dependencies ;; - *) cabal install --only-dependencies --enable-tests ;; - esac + - cabal install --only-dependencies --enable-tests - cabal install hpc-coveralls script: - - case "$CABALVER" in - "7.8.4") cabal configure --enable-library-coverage -v2 -f dev ;; - *) cabal configure --enable-tests --enable-coverage -v2 -f dev ;; - esac + - cabal configure --enable-tests --enable-coverage -v2 -f dev - travis_wait 40 cabal build - - case "$GHCVER" in - "7.8.4") true ;; - *) cabal test --show-details=always ;; - esac + - cabal test --show-details=always - cabal sdist - cabal haddock | grep "100%" | wc -l | grep "6" diff --git a/CHANGELOG.md b/CHANGELOG.md index 782f2a3..b448d9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ custom template predicate. Also exposed `isMustacheFile` as the default predicate used by functions like `compileMustacheDir`. +* Abandon attempts to support GHC 7.8. + ## Stache 1.1.2 * Fixed compilation of the test suite with Cabal 2.0/GHC 8.2.1. diff --git a/Text/Mustache/Compile.hs b/Text/Mustache/Compile.hs index ce59a8f..15baebb 100644 --- a/Text/Mustache/Compile.hs +++ b/Text/Mustache/Compile.hs @@ -36,10 +36,6 @@ import qualified Data.Text as T import qualified Data.Text.IO as T import qualified System.FilePath as F -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative -#endif - -- | Compile all templates in specified directory and select one. Template -- files should have the extension @mustache@, (e.g. @foo.mustache@) to be -- recognized. This function /does not/ scan the directory recursively. @@ -67,7 +63,7 @@ compileMustacheDir' :: MonadIO m -> m Template -- ^ The resulting template compileMustacheDir' predicate pname path = getMustacheFilesInDir' predicate path >>= - liftM selectKey . foldM f (Template undefined M.empty) + fmap selectKey . foldM f (Template undefined M.empty) where selectKey t = t { templateActual = pname } f (Template _ old) fp = do diff --git a/Text/Mustache/Compile/TH.hs b/Text/Mustache/Compile/TH.hs index 674b97f..a0ccaa8 100644 --- a/Text/Mustache/Compile/TH.hs +++ b/Text/Mustache/Compile/TH.hs @@ -38,10 +38,6 @@ import Text.Mustache.Type import qualified Data.Text as T import qualified Text.Mustache.Compile as C -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative -#endif - #if MIN_VERSION_template_haskell(2,11,0) import Language.Haskell.TH.Syntax (dataToExpQ) #else diff --git a/Text/Mustache/Render.hs b/Text/Mustache/Render.hs index e8d2d41..f3ddd88 100644 --- a/Text/Mustache/Render.hs +++ b/Text/Mustache/Render.hs @@ -39,10 +39,6 @@ import qualified Data.Text.Lazy.Builder as B import qualified Data.Text.Lazy.Encoding as TL import qualified Data.Vector as V -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative -#endif - ---------------------------------------------------------------------------- -- The rendering monad diff --git a/stache.cabal b/stache.cabal index 8338b18..de4d25f 100644 --- a/stache.cabal +++ b/stache.cabal @@ -1,7 +1,7 @@ name: stache version: 1.1.2 cabal-version: >= 1.18 -tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1 +tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.1 license: BSD3 license-file: LICENSE.md author: Mark Karpov @@ -29,7 +29,7 @@ flag dev library build-depends: aeson >= 0.11 && < 1.3 - , base >= 4.7 && < 5.0 + , base >= 4.8 && < 5.0 , bytestring >= 0.10 && < 0.11 , containers >= 0.5 && < 0.6 , deepseq >= 1.4 && < 1.5 @@ -62,7 +62,7 @@ test-suite tests hs-source-dirs: tests type: exitcode-stdio-1.0 build-depends: aeson >= 0.11 && < 1.3 - , base >= 4.7 && < 5.0 + , base >= 4.8 && < 5.0 , containers >= 0.5 && < 0.6 , hspec >= 2.0 && < 3.0 , hspec-megaparsec >= 1.0 && < 2.0 @@ -87,7 +87,7 @@ test-suite mustache-spec hs-source-dirs: mustache-spec type: exitcode-stdio-1.0 build-depends: aeson >= 0.11 && < 1.3 - , base >= 4.7 && < 5.0 + , base >= 4.8 && < 5.0 , bytestring >= 0.10 && < 0.11 , containers >= 0.5 && < 0.6 , file-embed @@ -107,7 +107,7 @@ benchmark bench hs-source-dirs: bench type: exitcode-stdio-1.0 build-depends: aeson >= 0.11 && < 1.3 - , base >= 4.7 && < 5.0 + , base >= 4.8 && < 5.0 , criterion >= 0.6.2.1 && < 1.3 , deepseq >= 1.4 && < 1.5 , megaparsec >= 6.0 && < 7.0