Comments only, in GhcPrelude
[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 -- Every module in GHC
10 -- * Is compiled with -XNoImplicitPrelude
11 -- * Explicitly imports GhcPrelude
12
13 module GhcPrelude (module X) where
14
15 -- We export the 'Semigroup' class but w/o the (<>) operator to avoid
16 -- clashing with the (Outputable.<>) operator which is heavily used
17 -- through GHC's code-base.
18
19 import Prelude as X hiding ((<>))
20 import Data.Foldable as X (foldl')
21
22 {-
23 Note [Why do we import Prelude here?]
24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 The files ghc-boot-th.cabal, ghc-boot.cabal, ghci.cabal and
26 ghc-heap.cabal contain the directive default-extensions:
27 NoImplicitPrelude. There are two motivations for this:
28 - Consistency with the compiler directory, which enables
29 NoImplicitPrelude;
30 - Allows loading the above dependent packages with ghc-in-ghci,
31 giving a smoother development experience when adding new
32 extensions.
33 -}