Skip to content

Commit

Permalink
Merge 567bf7d into 6f0b845
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed Sep 26, 2017
2 parents 6f0b845 + 567bf7d commit e9f1307
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 35 deletions.
20 changes: 3 additions & 17 deletions .travis.yml
Expand Up @@ -9,41 +9,27 @@ 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
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
- 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

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"

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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.
Expand Down
6 changes: 1 addition & 5 deletions Text/Mustache/Compile.hs
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions Text/Mustache/Compile/TH.hs
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions Text/Mustache/Render.hs
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions 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 <markkarpov92@gmail.com>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e9f1307

Please sign in to comment.