From c1e474f005c99ca3d2210411389970f5da55c422 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 9 Nov 2015 11:15:11 -0800 Subject: 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. --- prelude/Prelude.hs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'prelude') diff --git a/prelude/Prelude.hs b/prelude/Prelude.hs index ca5c687ea..50e86a7b9 100644 --- a/prelude/Prelude.hs +++ b/prelude/Prelude.hs @@ -1,23 +1,24 @@ {-# LANGUAGE PackageImports #-} {-# LANGUAGE CPP #-} +-- This custom Prelude emulates the API of the prelude +-- with base 4.8. + module Prelude ( module P -, Monoid(..) -, Applicative(..) #if MIN_VERSION_base(4,8,0) #else +, Monoid(..) +, Applicative(..) , (<$>) , (<$) #endif -, (<>) ) where #if MIN_VERSION_base(4,8,0) import "base" Prelude as P -import Data.Monoid ((<>)) #elif MIN_VERSION_base(4,6,0) import "base" Prelude as P import Control.Applicative @@ -27,13 +28,3 @@ import "base" Prelude as P hiding (catch) import Control.Applicative import Data.Monoid #endif - -#if MIN_VERSION_base(4,5,0) -#else -infixr 6 <> - --- | An infix synonym for 'mappend'. -(<>) :: Monoid m => m -> m -> m -(<>) = mappend -{-# INLINE (<>) #-} -#endif -- cgit v1.2.3