Reexport Semigroup's <> operator from Prelude (#14191)
[ghc.git] / compiler / utils / GhcPrelude.hs
1 {-# LANGUAGE CPP #-}
2
3 -- | Custom GHC "Prelude"
4 --
5 -- This module serves as a replacement for the "Prelude" module
6 -- and abstracts over differences between the bootstrapping
7 -- GHC version, and may also provide a common default vocabulary.
8 --
9 module GhcPrelude (module X) where
10
11 -- We export the 'Semigroup' class but w/o the (<>) operator to avoid
12 -- clashing with the (Outputable.<>) operator which is heavily used
13 -- through GHC's code-base.
14
15 #if MIN_VERSION_base(4,11,0)
16 import Prelude as X hiding ((<>))
17 #else
18 import Prelude as X
19 import Data.Semigroup as X (Semigroup)
20 #endif