summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
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 /testsuite/tests/ghci
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 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/scripts/T4175.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T7627.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/ghci011.stdout4
3 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout
index 0cf5e9b5c0..2a75b0da6a 100644
--- a/testsuite/tests/ghci/scripts/T4175.stdout
+++ b/testsuite/tests/ghci/scripts/T4175.stdout
@@ -36,6 +36,8 @@ instance Ord a => Ord (Maybe a) -- Defined in ‘Data.Maybe’
instance Read a => Read (Maybe a) -- Defined in ‘GHC.Read’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
instance Applicative Maybe -- Defined in ‘Data.Maybe’
+instance Foldable Maybe -- Defined in ‘Data.Foldable’
+instance Traversable Maybe -- Defined in ‘Data.Traversable’
type instance A (Maybe a) a = a -- Defined at T4175.hs:9:1
data Int = I# Int# -- Defined in ‘GHC.Types’
instance C Int -- Defined at T4175.hs:18:10
diff --git a/testsuite/tests/ghci/scripts/T7627.stdout b/testsuite/tests/ghci/scripts/T7627.stdout
index 9177bbd1e1..451c7051df 100644
--- a/testsuite/tests/ghci/scripts/T7627.stdout
+++ b/testsuite/tests/ghci/scripts/T7627.stdout
@@ -20,6 +20,8 @@ instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’
instance (Show a, Show b) => Show (a, b) -- Defined in ‘GHC.Show’
instance GHC.Base.Monoid a => Applicative ((,) a)
-- Defined in ‘GHC.Base’
+instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
+instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
data (#,#) (a :: OpenKind) (b :: OpenKind) = (#,#) a b
-- Defined in ‘GHC.Prim’
(,) :: a -> b -> (a, b)
diff --git a/testsuite/tests/ghci/scripts/ghci011.stdout b/testsuite/tests/ghci/scripts/ghci011.stdout
index 6b807f65c2..0563b83e66 100644
--- a/testsuite/tests/ghci/scripts/ghci011.stdout
+++ b/testsuite/tests/ghci/scripts/ghci011.stdout
@@ -6,6 +6,8 @@ instance Ord a => Ord [a] -- Defined in ‘GHC.Classes’
instance Read a => Read [a] -- Defined in ‘GHC.Read’
instance Show a => Show [a] -- Defined in ‘GHC.Show’
instance Applicative [] -- Defined in ‘GHC.Base’
+instance Foldable [] -- Defined in ‘Data.Foldable’
+instance Traversable [] -- Defined in ‘Data.Traversable’
data () = () -- Defined in ‘GHC.Tuple’
instance Bounded () -- Defined in ‘GHC.Enum’
instance Enum () -- Defined in ‘GHC.Enum’
@@ -23,3 +25,5 @@ instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’
instance (Show a, Show b) => Show (a, b) -- Defined in ‘GHC.Show’
instance GHC.Base.Monoid a => Applicative ((,) a)
-- Defined in ‘GHC.Base’
+instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
+instance Traversable ((,) a) -- Defined in ‘Data.Traversable’