New approach to custom Prelude.
We use no custom Prelude with the latest ghc version (8.4.1), so we don't have problems with ghci. See https://ghc.haskell.org/trac/ghc/ticket/10920 https://www.reddit.com/r/haskell/comments/3ryf2p/how_can_you_use_a_custom_prelude_with_ghci/ This may help with #4464.
This commit is contained in:
parent
09a32de173
commit
dd53545154
2 changed files with 38 additions and 14 deletions
38
pandoc.cabal
38
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue