diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2017-09-21 23:30:05 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2017-09-22 00:24:25 +0200 |
commit | feac0a3bc69fd376231aa3c83d031c131156ddb9 (patch) | |
tree | ad94a04d30869efe5a9d021f3fe2923269b5bfbd /compiler/utils/GhcPrelude.hs | |
parent | 9aa73892e10e90a1799b9277da593e816a827364 (diff) | |
download | haskell-feac0a3bc69fd376231aa3c83d031c131156ddb9.tar.gz |
Reexport Semigroup's <> operator from Prelude (#14191)
This completes the 2nd phase of the Semigroup=>Monoid Proposal (SMP)
initiated in 8ae263ceb3566a7c82336400b09cb8f381217405.
This updates a couple submodules to address <> naming clashes.
Diffstat (limited to 'compiler/utils/GhcPrelude.hs')
-rw-r--r-- | compiler/utils/GhcPrelude.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/utils/GhcPrelude.hs b/compiler/utils/GhcPrelude.hs index ed4eacbfb8..8b09bd5b3a 100644 --- a/compiler/utils/GhcPrelude.hs +++ b/compiler/utils/GhcPrelude.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + -- | Custom GHC "Prelude" -- -- This module serves as a replacement for the "Prelude" module @@ -6,4 +8,13 @@ -- module GhcPrelude (module X) where +-- We export the 'Semigroup' class but w/o the (<>) operator to avoid +-- clashing with the (Outputable.<>) operator which is heavily used +-- through GHC's code-base. + +#if MIN_VERSION_base(4,11,0) +import Prelude as X hiding ((<>)) +#else import Prelude as X +import Data.Semigroup as X (Semigroup) +#endif |