Commit graph

12 commits

Author SHA1 Message Date
Albert Krewinkel
a5fa55969f
Use implicit Prelude (#6187)
* Use implicit Prelude

The previous behavior was introduced as a fix for #4464. It seems that
this change alone did not fix the issue, and `stack ghci` and `cabal
repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded
for these versions. Given this, it seems cleaner to revert to the
implicit Prelude.

* PandocMonad: remove outdated check for base version

Only base versions 4.9 and later are supported, the check for
`MIN_VERSION_base(4,8,0)` is therefore unnecessary.

* Always use custom prelude

Previously, the custom prelude was used only with older GHC versions, as
a workaround for problems with ghci. The ghci problems are resolved by
replacing package `base` with `base-noprelude`, allowing for consistent
use of the custom prelude across all GHC versions.
2020-03-15 09:45:44 -07:00
John MacFarlane
dd53545154 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.
2018-03-18 09:20:21 -07:00
John MacFarlane
d0c27989a6 Fix Prelude <> export. 2018-03-16 12:28:52 -07:00
John MacFarlane
e21b57991e Added custom prelude.
We need this again because of Monoid/Semigroup.
2018-03-16 10:21:54 -07:00
John MacFarlane
0e16155aaf Remove custom prelude and ghc 7.8 support. 2018-01-14 23:31:49 -08:00
John MacFarlane
a1397ee081 Revert "Custom prelude - only export <> from Data.Monoid."
This reverts commit 01ea3edf0f.
2018-01-14 23:23:48 -08:00
John MacFarlane
01ea3edf0f Custom prelude - only export <> from Data.Monoid. 2018-01-14 23:04:47 -08:00
John MacFarlane
39f3d67848 Fix import. 2018-01-14 22:57:05 -08:00
John MacFarlane
2c00540485 Use base-compat for our custom prelude.
This should give us more complete coverage of newer
base features.

See #4255.
2018-01-14 18:34:26 -08:00
Jesse Rosenthal
09d96bb884 Remove unnecessary CPP in custom Prelude.
We don't have to worry about base < 4.7.
2016-09-03 15:23:32 -04:00
John MacFarlane
c1e474f005 Restored Text.Pandoc.Compat.Monoid.
Don't use custom prelude for latest ghc.

This is a better approach to making 'stack ghci' and 'cabal repl'
work.  Instead of using NoImplicitPrelude, we only use the custom
prelude for older ghc versions.  The custom prelude presents a
uniform API that matches the current base version's prelude.
So, when developing (presumably with latest ghc), we don't
use a custom prelude at all and hence have no trouble with ghci.

The custom prelude no longer exports (<>):  we now want to
match the base 4.8 prelude behavior.
2015-11-09 11:19:25 -08:00
John MacFarlane
82b3e0ab97 Use custom Prelude to avoid compiler warnings.
- The (non-exported) prelude is in prelude/Prelude.hs.
- It exports Monoid and Applicative, like base 4.8 prelude,
  but works with older base versions.
- It exports (<>) for mappend.
- It hides 'catch' on older base versions.

This allows us to remove many imports of Data.Monoid
and Control.Applicative, and remove Text.Pandoc.Compat.Monoid.

It should allow us to use -Wall again for ghc 7.10.
2015-10-14 09:09:10 -07:00