summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnMacFarlane <>2018-03-18 05:49:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-03-18 05:49:00 (GMT)
commite1aa864a6e2f1ca8c66c1e2a1eeebf1df295ef09 (patch)
treedf5dcb48422ae75a912b36c67f5edf7dc718bed8
parent67f23880956ad13d7ddeb02a3588580c50903267 (diff)
version 0.14.20.14.2
-rw-r--r--changelog6
-rw-r--r--pandoc-citeproc.cabal18
-rw-r--r--prelude/Prelude.hs30
-rw-r--r--src/Text/CSL/Input/Bibtex.hs2
-rw-r--r--src/Text/CSL/Style.hs5
-rw-r--r--stack.yaml10
6 files changed, 36 insertions, 35 deletions
diff --git a/changelog b/changelog
index f6e2d06..61a04e2 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,9 @@
+pandoc-citeproc 0.14.2
+
+ * Use custom Prelude to handle Monoid/Semigroup transition.
+ * Add Semigroup instance for Formatting (API change).
+ * Bump aeson upper bound.
+
pandoc-citeproc (0.14.1.5)
* Fixed 'capitalize-first' when the element begins with emphasis
diff --git a/pandoc-citeproc.cabal b/pandoc-citeproc.cabal
index 663f22a..a2051a1 100644
--- a/pandoc-citeproc.cabal
+++ b/pandoc-citeproc.cabal
@@ -1,5 +1,5 @@
name: pandoc-citeproc
-version: 0.14.1.5
+version: 0.14.2
cabal-version: >= 1.12
synopsis: Supports using pandoc with citeproc
@@ -111,7 +111,7 @@ library
pandoc-types >= 1.17.3 && < 1.18,
pandoc >= 1.16 && < 2.2,
tagsoup,
- aeson >= 0.7 && < 1.3,
+ aeson >= 0.7 && < 1.4,
text,
vector,
xml-conduit >= 1.2 && < 1.9,
@@ -119,12 +119,14 @@ library
data-default,
setenv >= 0.1 && < 0.2,
split, yaml >= 0.8.8.7
- default-language: Haskell2010
- default-extensions: CPP
-
+ if !impl(ghc >= 8.0)
+ build-depends: semigroups == 0.18.*
if impl(ghc < 7.6)
build-depends: ghc-prim
+ default-language: Haskell2010
+ default-extensions: CPP
+
if flag(debug)
build-depends: pretty-show
cpp-options: -DTRACE
@@ -160,6 +162,8 @@ executable pandoc-citeproc
aeson,
aeson-pretty >= 0.8, yaml, bytestring, syb, attoparsec, text,
filepath
+ if !impl(ghc >= 8.0)
+ build-depends: semigroups == 0.18.*
other-modules: Paths_pandoc_citeproc
Prelude
default-language: Haskell2010
@@ -185,6 +189,8 @@ executable test-citeproc
filepath, containers,
bytestring, pandoc-citeproc, process, temporary >= 1.1,
yaml >= 0.8.8.7, containers >= 0.4, vector >= 0.10
+ if !impl(ghc >= 8.0)
+ build-depends: semigroups == 0.18.*
ghc-options: -funbox-strict-fields -Wall -fno-warn-unused-do-bind -threaded
default-language: Haskell2010
other-modules: Text.CSL.Compat.Pandoc
@@ -201,5 +207,7 @@ test-suite test-pandoc-citeproc
bytestring, pandoc-citeproc, process, temporary >= 1.1,
yaml >= 0.8.8.7
ghc-options: -funbox-strict-fields -Wall -fno-warn-unused-do-bind -threaded
+ if !impl(ghc >= 8.0)
+ build-depends: semigroups == 0.18.*
default-language: Haskell2010
other-modules: Text.CSL.Compat.Pandoc
diff --git a/prelude/Prelude.hs b/prelude/Prelude.hs
index ca5c687..9c8ac93 100644
--- a/prelude/Prelude.hs
+++ b/prelude/Prelude.hs
@@ -5,35 +5,13 @@ module Prelude
(
module P
, Monoid(..)
+, Semigroup(..)
, Applicative(..)
-#if MIN_VERSION_base(4,8,0)
-#else
-, (<$>)
-, (<$)
-#endif
-, (<>)
)
where
-#if MIN_VERSION_base(4,8,0)
-import "base" Prelude as P
-import Data.Monoid ((<>))
-#elif MIN_VERSION_base(4,6,0)
import "base" Prelude as P
-import Control.Applicative
-import Data.Monoid
-#else
-import "base" Prelude as P hiding (catch)
-import Control.Applicative
-import Data.Monoid
-#endif
-
-#if MIN_VERSION_base(4,5,0)
-#else
-infixr 6 <>
-
--- | An infix synonym for 'mappend'.
-(<>) :: Monoid m => m -> m -> m
-(<>) = mappend
-{-# INLINE (<>) #-}
+import Data.Semigroup (Semigroup(..)) -- includes (<>)
+#if MIN_VERSION_base(4,11,0)
+import Data.Monoid (Monoid(..))
#endif
diff --git a/src/Text/CSL/Input/Bibtex.hs b/src/Text/CSL/Input/Bibtex.hs
index 7744ec9..ab88d65 100644
--- a/src/Text/CSL/Input/Bibtex.hs
+++ b/src/Text/CSL/Input/Bibtex.hs
@@ -24,7 +24,7 @@ module Text.CSL.Input.Bibtex
import Control.Applicative
import qualified Control.Exception as E
import Control.Monad
-import Control.Monad.RWS
+import Control.Monad.RWS hiding ((<>))
import Data.Char (isAlphaNum, isDigit, isUpper, toLower,
toUpper)
import Data.List (foldl', intercalate)
diff --git a/src/Text/CSL/Style.hs b/src/Text/CSL/Style.hs
index 50949c9..7e41401 100644
--- a/src/Text/CSL/Style.hs
+++ b/src/Text/CSL/Style.hs
@@ -223,9 +223,12 @@ instance AddYaml Formatted where
then acc
else (x Y..= Formatted y) : acc
+instance Semigroup Formatted where
+ (<>) = appendWithPunct
+
instance Monoid Formatted where
mempty = Formatted []
- mappend = appendWithPunct
+ mappend = (<>)
mconcat = foldr mappend mempty
instance Walk.Walkable Inline Formatted where
diff --git a/stack.yaml b/stack.yaml
index 8acaff1..934a604 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -8,11 +8,17 @@ flags:
static: false
packages:
- '.'
+- location: '../pandoc'
+ extra-dep: true
extra-deps:
- rfc5051-0.1.0.3
-- pandoc-2.1.1
+#- pandoc-2.1.3
+- texmath-0.10.1.1
+- tagsoup-0.14.6
+- pandoc-types-1.17.4.2
- hslua-0.9.5
-- skylighting-0.6
+- skylighting-0.7.0.2
+- skylighting-core-0.7.0.2
- xml-conduit-1.8.0
- conduit-1.3.0
- conduit-extra-1.3.0