git.iko.soy/typeable/pandoc
on master help sign in
Revert 0e48a02 and dependency on base-noprelude...

which hasn't been updated for ghc 8.10. See discussion at #6187.

commita9ef15bbd574bf09827c2c25ef1cd3efaf288f7c authorJohn MacFarlane <jgm@berkeley.edu> dateFri 17 Apr 2020, 09:50 (7 years ago) parentf623db1
2 files changed+43−33
pandoc.cabal+41−31 src/Text/Pandoc/App/CommandLineOptions.hs+2−2
pandoc.cabal+41−31
@@ -377,8 +377,7 @@ flag trypandoc
377377 Default: False
378378
379379library
380− build-depends: base-noprelude >= 4.9 && < 5,
381− base-compat >= 0.9,
380+ build-depends: base >= 4.9 && < 5,
382381 syb >= 0.1 && < 0.8,
383382 containers >= 0.4.2.1 && < 0.7,
384383 unordered-containers >= 0.2 && < 0.3,
@@ -442,6 +441,10 @@ library
442441 build-depends: basement >= 0.0.10,
443442 foundation >= 0.0.23
444443 -- basement 0.0.9 won't build on 32-bit windows.
444+ if impl(ghc < 8.4)
445+ hs-source-dirs: prelude
446+ other-modules: Prelude
447+ build-depends: base-compat >= 0.9
445448 if os(windows)
446449 cpp-options: -D_WINDOWS
447450 else
@@ -469,8 +472,7 @@ library
469472
470473 default-language: Haskell2010
471474 other-extensions: NoImplicitPrelude
472− hs-source-dirs: src,
473− prelude
475+ hs-source-dirs: src
474476
475477 exposed-modules: Text.Pandoc,
476478 Text.Pandoc.App,
@@ -564,8 +566,7 @@ library
564566 Text.Pandoc.ImageSize,
565567 Text.Pandoc.BCP47,
566568 Text.Pandoc.Class
567− other-modules: Prelude,
568− Text.Pandoc.App.CommandLineOptions,
569+ other-modules: Text.Pandoc.App.CommandLineOptions,
569570 Text.Pandoc.App.FormatHeuristics,
570571 Text.Pandoc.App.Opt,
571572 Text.Pandoc.App.OutputSettings,
@@ -642,19 +643,19 @@ library
642643 buildable: True
643644
644645executable pandoc
645− build-depends: pandoc,
646− base-noprelude >= 4.8 && < 5,
647− base-compat >= 0.9
646+ build-depends: pandoc, base >= 4.8 && < 5
647+ if impl(ghc < 8.4)
648+ hs-source-dirs: prelude
649+ other-modules: Prelude
650+ build-depends: base-compat >= 0.9
648651 if flag(static)
649652 ld-options: -static
650653 default-language: Haskell2010
651654 other-extensions: NoImplicitPrelude
652655 hs-source-dirs: .
653− prelude
654656 main-is: pandoc.hs
655657 buildable: True
656− other-modules: Paths_pandoc,
657− Prelude
658+ other-modules: Paths_pandoc
658659 ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
659660 -Wall -fno-warn-unused-do-bind
660661 -Wincomplete-record-updates
@@ -669,16 +670,19 @@ executable pandoc
669670
670671executable trypandoc
671672 main-is: trypandoc.hs
672− hs-source-dirs: trypandoc, prelude
673+ hs-source-dirs: trypandoc
673674 default-language: Haskell2010
674675 other-extensions: NoImplicitPrelude
675− other-modules: Prelude
676676 if flag(trypandoc)
677− build-depends: base-noprelude, base-compat >= 0.9, aeson, pandoc,
677+ build-depends: base, aeson, pandoc,
678678 text, wai-extra, wai >= 0.3, http-types
679679 buildable: True
680680 else
681681 buildable: False
682+ if impl(ghc < 8.4)
683+ hs-source-dirs: prelude
684+ other-modules: Prelude
685+ build-depends: base-compat >= 0.9
682686 ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
683687 -Wall -fno-warn-unused-do-bind
684688 -Wincomplete-record-updates
@@ -694,16 +698,18 @@ executable trypandoc
694698benchmark weigh-pandoc
695699 type: exitcode-stdio-1.0
696700 main-is: weigh-pandoc.hs
697− hs-source-dirs: benchmark,
698− prelude
701+ hs-source-dirs: benchmark
699702 build-depends: pandoc,
700− base-noprelude >= 4.8 && < 5,
701− base-compat >= 0.9,
703+ base >= 4.8 && < 5,
702704 text,
703705 weigh >= 0.0 && < 0.1,
704706 mtl >= 2.2 && < 2.3
707+ if impl(ghc < 8.4)
708+ hs-source-dirs: prelude
709+ other-modules: Prelude
710+ build-depends: base-compat >= 0.9
705711 default-language: Haskell2010
706− other-modules: Prelude
712+ other-extensions: NoImplicitPrelude
707713 ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
708714 -Wall -fno-warn-unused-do-bind
709715 -Wincomplete-record-updates
@@ -720,10 +726,8 @@ benchmark weigh-pandoc
720726test-suite test-pandoc
721727 type: exitcode-stdio-1.0
722728 main-is: test-pandoc.hs
723− hs-source-dirs: test,
724− prelude
725− build-depends: base-noprelude >= 4.8 && < 5,
726− base-compat >= 0.9,
729+ hs-source-dirs: test
730+ build-depends: base >= 4.8 && < 5,
727731 pandoc,
728732 pandoc-types >= 1.20 && < 1.21,
729733 mtl >= 2.2 && < 2.3,
@@ -749,8 +753,11 @@ test-suite test-pandoc
749753 xml >= 1.3.12 && < 1.4,
750754 doctemplates >= 0.8.2 && < 0.9,
751755 Glob >= 0.7 && < 0.11
752− other-modules: Prelude
753− Tests.Old
756+ if impl(ghc < 8.4)
757+ hs-source-dirs: prelude
758+ other-modules: Prelude
759+ build-depends: base-compat >= 0.9
760+ other-modules: Tests.Old
754761 Tests.Command
755762 Tests.Helpers
756763 Tests.Lua
@@ -806,6 +813,7 @@ test-suite test-pandoc
806813 if os(windows)
807814 cpp-options: -D_WINDOWS
808815 default-language: Haskell2010
816+ other-extensions: NoImplicitPrelude
809817 ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
810818 -Wall -fno-warn-unused-do-bind
811819 -Wincomplete-record-updates
@@ -822,17 +830,19 @@ test-suite test-pandoc
822830benchmark benchmark-pandoc
823831 type: exitcode-stdio-1.0
824832 main-is: benchmark-pandoc.hs
825− hs-source-dirs: benchmark,
826− prelude
833+ hs-source-dirs: benchmark
827834 build-depends: pandoc,
828835 time, bytestring, containers,
829− base-noprelude >= 4.8 && < 5,
830− base-compat >= 0.9,
836+ base >= 4.8 && < 5,
831837 text >= 1.1.1.0 && < 1.3,
832838 mtl >= 2.2 && < 2.3,
833839 criterion >= 1.0 && < 1.6
840+ if impl(ghc < 8.4)
841+ hs-source-dirs: prelude
842+ other-modules: Prelude
843+ build-depends: base-compat >= 0.9
834844 default-language: Haskell2010
835− other-modules: Prelude
845+ other-extensions: NoImplicitPrelude
836846 ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
837847 -Wall -fno-warn-unused-do-bind
838848 -Wincomplete-record-updates
src/Text/Pandoc/App/CommandLineOptions.hs+2−2
@@ -30,7 +30,7 @@ import Data.Bifunctor (second)
3030import Data.Char (toLower)
3131import Data.List (intercalate, sort)
3232#ifdef _WINDOWS
33−#if MIN_VERSION_base_noprelude(4,12,0)
33+#if MIN_VERSION_base(4,12,0)
3434import Data.List (isPrefixOf)
3535#endif
3636#endif
@@ -1033,7 +1033,7 @@ setVariable key val (Context ctx) = Context $ M.alter go key ctx
10331033-- beginning with \\ to \\?\UNC\. -- See #5127.
10341034normalizePath :: FilePath -> FilePath
10351035#ifdef _WINDOWS
1036−#if MIN_VERSION_base_noprelude(4,12,0)
1036+#if MIN_VERSION_base(4,12,0)
10371037normalizePath fp =
10381038 if "\\\\" `isPrefixOf` fp && not ("\\\\?\\" `isPrefixOf` fp)
10391039 then "\\\\?\\UNC\\" ++ drop 2 fp