diff --git a/pandoc.cabal b/pandoc.cabal index c190effcb..7fd08662c 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -11,7 +11,7 @@ bug-reports: https://github.com/jgm/pandoc/issues stability: alpha homepage: https://pandoc.org category: Text -tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2 +tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1 synopsis: Conversion between markup formats description: Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses @@ -398,8 +398,12 @@ library http-client-tls >= 0.2.4 && < 0.4, http-types >= 0.8 && < 0.13, case-insensitive >= 1.2 && < 1.3 - if !impl(ghc >= 8.0) + if impl(ghc < 8.0) build-depends: semigroups == 0.18.* + if impl(ghc < 8.4) + hs-source-dirs: prelude + other-modules: Prelude + build-depends: base-compat >= 0.9 if os(windows) cpp-options: -D_WINDOWS else @@ -563,8 +567,12 @@ library executable pandoc build-depends: pandoc, base >= 4.7 && < 5 - if !impl(ghc >= 8.0) + if impl(ghc < 8.0) build-depends: semigroups == 0.18.* + if impl(ghc < 8.4) + hs-source-dirs: prelude + other-modules: Prelude + build-depends: base-compat >= 0.9 ghc-options: -rtsopts -with-rtsopts=-K16m -Wall -fno-warn-unused-do-bind -threaded if flag(static) ld-options: -static @@ -590,8 +598,12 @@ executable trypandoc buildable: True else buildable: False - if !impl(ghc >= 8.0) + if impl(ghc < 8.0) build-depends: semigroups == 0.18.* + if impl(ghc < 8.4) + hs-source-dirs: prelude + other-modules: Prelude + build-depends: base-compat >= 0.9 executable weigh-pandoc main-is: weigh-pandoc.hs @@ -606,8 +618,12 @@ executable weigh-pandoc buildable: True else buildable: False - if !impl(ghc >= 8.0) + if impl(ghc < 8.0) build-depends: semigroups == 0.18.* + if impl(ghc < 8.4) + hs-source-dirs: prelude + other-modules: Prelude + build-depends: base-compat >= 0.9 ghc-options: -rtsopts -Wall -fno-warn-unused-do-bind default-language: Haskell98 @@ -638,8 +654,12 @@ test-suite test-pandoc zip-archive >= 0.2.3.4 && < 0.4, xml >= 1.3.12 && < 1.4, Glob >= 0.7 && < 0.10 - if !impl(ghc >= 8.0) + if impl(ghc < 8.0) build-depends: semigroups == 0.18.* + if impl(ghc < 8.4) + hs-source-dirs: prelude + other-modules: Prelude + build-depends: base-compat >= 0.9 if flag(old-locale) build-depends: old-locale >= 1 && < 1.1, time >= 1.2 && < 1.5 @@ -706,7 +726,11 @@ benchmark benchmark-pandoc base >= 4.2 && < 5, text >= 0.11 && < 1.3, criterion >= 1.0 && < 1.5 - if !impl(ghc >= 8.0) + if impl(ghc < 8.0) build-depends: semigroups == 0.18.* + if impl(ghc < 8.4) + hs-source-dirs: prelude + other-modules: Prelude + build-depends: base-compat >= 0.9 ghc-options: -rtsopts -Wall -fno-warn-unused-do-bind default-language: Haskell98 diff --git a/prelude/Prelude.hs b/prelude/Prelude.hs index 9c8ac9363..5ea523433 100644 --- a/prelude/Prelude.hs +++ b/prelude/Prelude.hs @@ -1,17 +1,17 @@ +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE CPP #-} +-- The intent is that this Prelude provide the API of +-- the base 4.11 Prelude in a way that is portable for +-- all base versions. + module Prelude ( - module P -, Monoid(..) + module Prelude.Compat , Semigroup(..) -, Applicative(..) ) where -import "base" Prelude as P +import Prelude.Compat import Data.Semigroup (Semigroup(..)) -- includes (<>) -#if MIN_VERSION_base(4,11,0) -import Data.Monoid (Monoid(..)) -#endif