aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml12
-rw-r--r--cabal.project2
-rw-r--r--pandoc.cabal30
-rw-r--r--prelude/Prelude.hs15
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs6
5 files changed, 15 insertions, 50 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f0b17d3de..4b73442bf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -43,20 +43,10 @@ jobs:
fail-fast: true
matrix:
versions:
- - ghc: '8.2.2'
- cabal: '2.4'
- prefix: 'v2-'
- cabalopts: ''
- testopts: ''
- - ghc: '8.4.4'
- cabal: '2.4'
- prefix: 'v2-'
- cabalopts: '-f-embed_data_files'
- testopts: ''
- ghc: '8.6.5'
cabal: '3.2'
prefix: ''
- cabalopts: ''
+ cabalopts: '-f-embed_data_files'
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
- ghc: '8.8.4'
cabal: '3.2'
diff --git a/cabal.project b/cabal.project
index a7bfa540f..b0606c372 100644
--- a/cabal.project
+++ b/cabal.project
@@ -1,5 +1,5 @@
packages: pandoc.cabal
tests: True
flags: +embed_data_files
-constraints: aeson >= 2.0.1.0, transformers >= 0.5.6
+constraints: aeson >= 2.0.1.0
diff --git a/pandoc.cabal b/pandoc.cabal
index 3bda8e877..1b6f3a50a 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -409,31 +409,27 @@ flag trypandoc
common common-options
default-language: Haskell2010
- build-depends: base >= 4.9 && < 5
+ build-depends: base >= 4.12 && < 5
ghc-options: -Wall -fno-warn-unused-do-bind
-Wincomplete-record-updates
-Wnoncanonical-monad-instances
+ -Wcpp-undef
+ -Wincomplete-uni-patterns
+ -Widentities
+ -Wpartial-fields
+ -Wmissing-signatures
+ -fhide-source-paths
+ -- -Wmissing-export-lists
- if impl(ghc < 8.6)
- hs-source-dirs: prelude
- other-modules: Prelude
- build-depends: base-compat >= 0.10.5
- other-extensions: NoImplicitPrelude
+ if impl(ghc >= 8.10)
+ ghc-options: -Wunused-packages
+
+ if impl(ghc >= 9.0)
+ ghc-options: -Winvalid-haddock
if os(windows)
cpp-options: -D_WINDOWS
- -- Later:
- -- -Wpartial-fields (currently used in Powerpoint writer)
- -- -Wmissing-export-lists (currently some Odt modules violate this)
- -- -Wredundant-constraints (problematic if we want to support older base)
- if impl(ghc >= 8.2)
- ghc-options: -Wcpp-undef
- if impl(ghc >= 8.4)
- ghc-options: -Wincomplete-uni-patterns
- -Widentities
- -fhide-source-paths
-
common common-executable
import: common-options
build-depends: pandoc
diff --git a/prelude/Prelude.hs b/prelude/Prelude.hs
deleted file mode 100644
index 2d81ec1ff..000000000
--- a/prelude/Prelude.hs
+++ /dev/null
@@ -1,15 +0,0 @@
-{-# LANGUAGE NoImplicitPrelude #-}
-
--- 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 Prelude.Compat
-, Semigroup(..)
-)
-where
-
-import Prelude.Compat
-import Data.Semigroup (Semigroup(..)) -- includes (<>)
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index 0d3c12c30..759f8ac35 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -33,10 +33,8 @@ import Data.Bifunctor (second)
import Data.Char (toLower)
import Data.List (intercalate, sort, foldl')
#ifdef _WINDOWS
-#if MIN_VERSION_base(4,12,0)
import Data.List (isPrefixOf)
#endif
-#endif
import Data.Maybe (fromMaybe, isJust)
import Data.Text (Text)
import Safe (tailDef)
@@ -1078,7 +1076,6 @@ readMetaValue s
-- beginning with \\ to \\?\UNC\. -- See #5127.
normalizePath :: FilePath -> FilePath
#ifdef _WINDOWS
-#if MIN_VERSION_base(4,12,0)
normalizePath fp =
if "\\\\" `isPrefixOf` fp && not ("\\\\?\\" `isPrefixOf` fp)
then "\\\\?\\UNC\\" ++ drop 2 fp
@@ -1086,6 +1083,3 @@ normalizePath fp =
#else
normalizePath = id
#endif
-#else
-normalizePath = id
-#endif