Skip to content

Commit

Permalink
chore: Test with more GHC versions
Browse files Browse the repository at this point in the history
  • Loading branch information
414owen committed Nov 26, 2023
1 parent 02abae5 commit fad27a5
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 5 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,36 @@ jobs:
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
compilerKind: ghc
compilerVersion: 9.0.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
compilerVersion: 8.10.7
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
Expand Down Expand Up @@ -174,8 +204,8 @@ jobs:
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_pandoc_builder_monadic}" >> cabal.project
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then echo "package pandoc-builder-monadic" >> cabal.project ; fi
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package pandoc-builder-monadic" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(pandoc-builder-monadic)$/; }' >> cabal.project.local
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# pandoc-builder-monadic


[![CI status badge](https://img.shields.io/github/actions/workflow/status/414owen/pandoc-builder-monadic/haskell-ci.yml)](https://github.com/414owen/pandoc-builder-monadic/actions/workflows/haskell-ci.yml) [![Hackage version badge](https://img.shields.io/hackage/v/pandoc-builder-monadic)](https://hackage.haskell.org/package/pandoc-builder-monadic) [![license](https://img.shields.io/github/license/414owen/pandoc-builder-monadic)](https://github.com/414owen/pandoc-builder-monadic/blob/master/LICENSE)
[![GHC version badge](https://img.shields.io/badge/ghc-%3E%3D8.0.2-blue?logo=haskell)](https://www.haskell.org/) [![CI status badge](https://img.shields.io/github/actions/workflow/status/414owen/pandoc-builder-monadic/haskell-ci.yml)](https://github.com/414owen/pandoc-builder-monadic/actions/workflows/haskell-ci.yml) [![Hackage version badge](https://img.shields.io/hackage/v/pandoc-builder-monadic)](https://hackage.haskell.org/package/pandoc-builder-monadic) [![license](https://img.shields.io/github/license/414owen/pandoc-builder-monadic)](https://github.com/414owen/pandoc-builder-monadic/blob/master/LICENSE)

This library provides a monadic DSL for constructing Pandoc documents.

Expand Down
11 changes: 10 additions & 1 deletion pandoc-builder-monadic.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ maintainer: owen@owen.cafe
category: Text
build-type: Simple
extra-source-files: README.md CHANGELOG.md
tested-with: GHC==9.6.2, GHC==9.4.5, GHC==9.2.8, GHC==8.0.2
tested-with: GHC==9.6.2
, GHC==9.4.5
, GHC==9.2.8
, GHC==9.0.2
, GHC==8.10.7
, GHC==8.8.4
, GHC==8.6.5
, GHC==8.4.4
, GHC==8.2.2
, GHC==8.0.2

common warnings
ghc-options: -Wall -Wextra -Wunused-packages
Expand Down
6 changes: 6 additions & 0 deletions src/Text/Pandoc/Builder/Monadic/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ instance Semigroup (BuilderM el a) where

instance Monoid a => Monoid (BuilderM el a) where
mempty = Builder $ pure mempty
#if !(MIN_VERSION_base(4,11,0))
mappend f g = do
a <- f
b <- g
pure (mappend a b)
#endif

instance B.ToMetaValue (Builder Inline) where
toMetaValue = B.MetaInlines . runToList
Expand Down

0 comments on commit fad27a5

Please sign in to comment.