summaryrefslogtreecommitdiff
path: root/compiler/hsSyn
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-09-15 08:37:30 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2014-09-15 08:37:39 +0200
commitc0fa383d9109800a4e46a81b418f1794030ba1bd (patch)
tree19dc80e4d266eb6fd7b56b6f61d4f7ed4f10a097 /compiler/hsSyn
parent004c5f4fec78414943d788c2a8b42a4500272949 (diff)
downloadhaskell-c0fa383d9109800a4e46a81b418f1794030ba1bd.tar.gz
Export `Traversable()` and `Foldable()` from Prelude
This exposes *only* the type-classes w/o any of their methods. This is the very first step for implementing BPP (see #9586), which already requires breaking up several import-cycles leading back to `Prelude`. Ideally, importing `Prelude` should be avoided in most `base` modules, as `Prelude` does not define any entities, but rather re-exports existing ones. Test Plan: validate passes Reviewers: ekmett, austin Reviewed By: ekmett, austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D209 GHC Trac Issues: #9586
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r--compiler/hsSyn/HsDecls.lhs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs
index f584372385..3d412874fd 100644
--- a/compiler/hsSyn/HsDecls.lhs
+++ b/compiler/hsSyn/HsDecls.lhs
@@ -4,6 +4,7 @@
%
\begin{code}
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable,
DeriveTraversable #-}
{-# LANGUAGE StandaloneDeriving #-}
@@ -98,8 +99,10 @@ import FastString
import Bag
import Data.Data hiding (TyCon,Fixity)
-import Data.Foldable (Foldable)
-import Data.Traversable
+#if __GLASGOW_HASKELL__ < 709
+import Data.Foldable ( Foldable )
+import Data.Traversable ( Traversable )
+#endif
import Data.Maybe
\end{code}