git.iko.soy/typeable/pandoc
on master help sign in
Added custom prelude.

We need this again because of Monoid/Semigroup.

commite21b57991e589d88f50991b87c6ec01d350e9b22 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 16 Mar 2018, 10:08 (9 years ago) parentbc2f442
2 files changed+38−8
pandoc.cabal+16−8 prelude/Prelude.hs+22
pandoc.cabal+16−8
@@ -398,6 +398,8 @@ library
398398 http-client-tls >= 0.2.4 && < 0.4,
399399 http-types >= 0.8 && < 0.13,
400400 case-insensitive >= 1.2 && < 1.3
401+ if !impl(ghc >= 8.0)
402+ build-depends: semigroups == 0.18.*
401403 if os(windows)
402404 cpp-options: -D_WINDOWS
403405 else
@@ -423,7 +425,7 @@ library
423425 ScopedTypeVariables, GeneralizedNewtypeDeriving,
424426 RelaxedPolyRec, DeriveDataTypeable, TypeSynonymInstances,
425427 FlexibleInstances
426− hs-source-dirs: src
428+ hs-source-dirs: src, prelude
427429
428430 exposed-modules: Text.Pandoc,
429431 Text.Pandoc.App,
@@ -508,7 +510,8 @@ library
508510 Text.Pandoc.ImageSize,
509511 Text.Pandoc.BCP47,
510512 Text.Pandoc.Class
511− other-modules: Text.Pandoc.Filter,
513+ other-modules: Prelude,
514+ Text.Pandoc.Filter,
512515 Text.Pandoc.Filter.JSON,
513516 Text.Pandoc.Filter.Lua,
514517 Text.Pandoc.Filter.Path,
@@ -568,14 +571,16 @@ executable pandoc
568571 ScopedTypeVariables, GeneralizedNewtypeDeriving,
569572 RelaxedPolyRec, DeriveDataTypeable, TypeSynonymInstances,
570573 FlexibleInstances
571− hs-source-dirs: .
574+ hs-source-dirs: ., prelude
572575 main-is: pandoc.hs
573576 buildable: True
574577 other-modules: Paths_pandoc
578+ Prelude
575579
576580executable trypandoc
577581 main-is: trypandoc.hs
578− hs-source-dirs: trypandoc
582+ hs-source-dirs: trypandoc, prelude
583+ other-modules: Prelude
579584 default-language: Haskell2010
580585 if flag(trypandoc)
581586 build-depends: base, aeson, pandoc,
@@ -586,7 +591,8 @@ executable trypandoc
586591
587592executable weigh-pandoc
588593 main-is: weigh-pandoc.hs
589− hs-source-dirs: benchmark
594+ hs-source-dirs: benchmark, prelude
595+ other-modules: Prelude
590596 if flag(weigh-pandoc)
591597 build-depends: pandoc,
592598 base >= 4.2 && < 5,
@@ -602,7 +608,7 @@ executable weigh-pandoc
602608test-suite test-pandoc
603609 type: exitcode-stdio-1.0
604610 main-is: test-pandoc.hs
605− hs-source-dirs: test
611+ hs-source-dirs: test, prelude
606612 build-depends: base >= 4.2 && < 5,
607613 pandoc,
608614 pandoc-types >= 1.17.4 && < 1.18,
@@ -631,7 +637,8 @@ test-suite test-pandoc
631637 time >= 1.2 && < 1.5
632638 else
633639 build-depends: time >= 1.5 && < 1.10
634− other-modules: Tests.Old
640+ other-modules: Prelude
641+ Tests.Old
635642 Tests.Command
636643 Tests.Helpers
637644 Tests.Lua
@@ -684,7 +691,8 @@ test-suite test-pandoc
684691benchmark benchmark-pandoc
685692 type: exitcode-stdio-1.0
686693 main-is: benchmark-pandoc.hs
687− hs-source-dirs: benchmark
694+ hs-source-dirs: benchmark, prelude
695+ other-modules: Prelude
688696 build-depends: pandoc,
689697 time, bytestring, containers,
690698 base >= 4.2 && < 5,
prelude/Prelude.hsnew file+22
@@ -0,0 +1,22 @@
1+{-# LANGUAGE PackageImports #-}
2+{-# LANGUAGE CPP #-}
3+
4+module Prelude
5+(
6+ module P
7+, Monoid(..)
8+, Semigroup(..)
9+, Applicative(..)
10+#if MIN_VERSION_base(4,9,0)
11+-- <> is exported in Semigroup
12+#else
13+, (<>)
14+#endif
15+)
16+where
17+
18+import "base" Prelude as P
19+import Data.Semigroup (Semigroup(..)) -- includes (<>)
20+#if MIN_VERSION_base(4,11,0)
21+import Data.Monoid (Monoid(..))
22+#endif