diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-15 08:37:30 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-15 08:37:39 +0200 |
commit | c0fa383d9109800a4e46a81b418f1794030ba1bd (patch) | |
tree | 19dc80e4d266eb6fd7b56b6f61d4f7ed4f10a097 /testsuite | |
parent | 004c5f4fec78414943d788c2a8b42a4500272949 (diff) | |
download | haskell-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')
-rw-r--r-- | testsuite/tests/ghci/scripts/T4175.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T7627.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci011.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/perf/compiler/all.T | 9 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/FD2.stderr | 4 |
5 files changed, 16 insertions, 5 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’ diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index f71204f2d5..be09a1c6d0 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -246,7 +246,7 @@ test('T3064', # 2012-10-30: 111189536 (x86/Windows) # 2013-11-13: 146626504 (x86/Windows, 64bit machine) # 2014-01-22: 162457940 (x86/Linux) - (wordsize(64), 407416464, 5)]), + (wordsize(64), 385145080, 5)]), # (amd64/Linux) (28/06/2011): 73259544 # (amd64/Linux) (07/02/2013): 224798696 # (amd64/Linux) (02/08/2013): 236404384, increase from roles @@ -258,6 +258,7 @@ test('T3064', # (amd64/Linux) (2014-07-17): 332702112, general round of updates # (amd64/Linux) (2014-08-29): 313638592, w/w for INLINABLE things # (amd64/Linux) (09/09/2014): 407416464, AMP changes (larger interfaces, more loading) + # (amd64/Linux) (14/09/2014): 385145080, BPP changes (more NoImplicitPrelude in base) compiler_stats_num_field('max_bytes_used', [(wordsize(32), 11202304, 20), @@ -265,7 +266,7 @@ test('T3064', #(some date): 5511604 # 2013-11-13: 7218200 (x86/Windows, 64bit machine) # 2014-04-04: 11202304 (x86/Windows, 64bit machine) - (wordsize(64), 24357392, 20)]), + (wordsize(64), 16053888, 20)]), # (amd64/Linux, intree) (28/06/2011): 4032024 # (amd64/Linux, intree) (07/02/2013): 9819288 # (amd64/Linux) (14/02/2013): 8687360 @@ -277,6 +278,7 @@ test('T3064', # (amd64/Linux) (22/11/2013): 16266992, GND via Coercible and counters for constraints solving # (amd64/Linux) (12/12/2013): 19821544, better One shot analysis # (amd64/Linux) (09/09/2014): 24357392, AMP changes (larger interfaces, more loading) + # (amd64/Linux) (14/09/2014): 16053888, BPP changes (more NoImplicitPrelude in base) only_ways(['normal']) ], compile, @@ -456,7 +458,7 @@ test('T6048', # 2012-10-08: 48887164 (x86/Linux) # 2014-04-04: 62618072 (x86 Windows, 64 bit machine) # 2014-09-03: 56315812 (x86 Windows, w/w for INLINEAVBLE) - (wordsize(64), 108354472, 12)]) + (wordsize(64), 88186056, 12)]) # 18/09/2012 97247032 amd64/Linux # 16/01/2014 108578664 amd64/Linux (unknown, likely foldl-via-foldr) # 18/01/2014 95960720 amd64/Linux Call Arity improvements @@ -464,6 +466,7 @@ test('T6048', # 05/03/2014 110646312 amd64/Linux Call Arity became more elaborate # 14/07/2014 125431448 amd64/Linux unknown reason. Even worse in GHC-7.8.3. *shurg* # 29/08/2014 108354472 amd64/Linux w/w for INLINABLE things + # 14/09/2014 88186056 amd64/Linux BPP part1 change (more NoImplicitPreludes in base) ], compile,['']) diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr index 06e5afd730..691d5b5b84 100644 --- a/testsuite/tests/typecheck/should_compile/FD2.stderr +++ b/testsuite/tests/typecheck/should_compile/FD2.stderr @@ -1,8 +1,8 @@ FD2.hs:26:34: Could not deduce (e ~ e1) - from the context (Foldable a) - bound by the class declaration for ‘Foldable’ + from the context (ShouldCompile.Foldable a) + bound by the class declaration for ‘ShouldCompile.Foldable’ at FD2.hs:(17,1)-(26,39) or from (Elem a e) bound by the type signature for |