summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2013-09-09 14:14:05 -0500
committerAustin Seipp <austin@well-typed.com>2013-09-11 19:49:13 -0500
commit47a0c363a824b662998ddd12868adc01e3b75d59 (patch)
tree43811a63ebe14dc91c89e616654572769e263103 /testsuite
parent13f1caade9b9a2a8c5de6affd175f10c4b61e7ef (diff)
downloadhaskell-47a0c363a824b662998ddd12868adc01e3b75d59.tar.gz
Fix remaining AMP fallout.
The perf tests can probably be rechecked and tightened a little; I fixed them with AMP the other day but some changes since then have made them wibble perhaps. Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.stderr4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print019.stderr2
-rw-r--r--testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr2
-rw-r--r--testsuite/tests/perf/compiler/T3064.hs12
-rw-r--r--testsuite/tests/perf/compiler/all.T17
-rw-r--r--testsuite/tests/rename/should_compile/T7145b.hs4
-rw-r--r--testsuite/tests/rename/should_compile/T7145b.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/holes2.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T5095.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail083.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail133.stderr2
12 files changed, 34 insertions, 19 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stderr b/testsuite/tests/ghci.debugger/scripts/break006.stderr
index 7e22617185..8c190057b6 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break006.stderr
@@ -9,7 +9,7 @@
instance Show Float -- Defined in ‛GHC.Float’
instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
-- Defined in ‛GHC.Real’
- ...plus 23 others
+ ...plus 24 others
In a stmt of an interactive GHCi command: print it
<interactive>:8:1:
@@ -22,5 +22,5 @@
instance Show Float -- Defined in ‛GHC.Float’
instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
-- Defined in ‛GHC.Real’
- ...plus 23 others
+ ...plus 24 others
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci.debugger/scripts/print019.stderr b/testsuite/tests/ghci.debugger/scripts/print019.stderr
index 3473c99dd9..c53fb9cc47 100644
--- a/testsuite/tests/ghci.debugger/scripts/print019.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/print019.stderr
@@ -8,5 +8,5 @@
instance Show a => Show (List1 a) -- Defined at ../Test.hs:11:12
instance Show MyInt -- Defined at ../Test.hs:14:16
instance Show a => Show (MkT a) -- Defined at ../Test.hs:17:13
- ...plus 31 others
+ ...plus 32 others
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr b/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr
index cc1082c7de..74ca081ac4 100644
--- a/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr
+++ b/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr
@@ -7,7 +7,7 @@ overloadedlistsfail01.hs:5:8:
instance Show Float -- Defined in ‛GHC.Float’
instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
-- Defined in ‛GHC.Real’
- ...plus 23 others
+ ...plus 24 others
In the expression: print [1]
In an equation for ‛main’: main = print [1]
diff --git a/testsuite/tests/perf/compiler/T3064.hs b/testsuite/tests/perf/compiler/T3064.hs
index 5dde491e8a..d3cdea36d2 100644
--- a/testsuite/tests/perf/compiler/T3064.hs
+++ b/testsuite/tests/perf/compiler/T3064.hs
@@ -1,9 +1,17 @@
{-# LANGUAGE Rank2Types, TypeSynonymInstances, FlexibleInstances #-}
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
module Bug2 where
+import Control.Applicative
newtype ReaderT r m a = ReaderT { runReaderT :: r -> m a }
+instance Functor f => Functor (ReaderT r f) where
+ fmap f m = ReaderT $ (fmap f) . runReaderT m
+
+instance Applicative f => Applicative (ReaderT r f) where
+ pure m = ReaderT (const $ pure m)
+ f <*> v = ReaderT $ \r -> runReaderT f r <*> runReaderT v r
+
instance (Monad m) => Monad (ReaderT r m) where
return a = ReaderT $ \_ -> return a
m >>= k = ReaderT $ \r -> do
@@ -12,7 +20,7 @@ instance (Monad m) => Monad (ReaderT r m) where
fail msg = ReaderT $ \_ -> fail msg
newtype ResourceT r s m v = ResourceT { unResourceT :: ReaderT r m v }
- deriving (Monad)
+ deriving (Functor, Applicative, Monad)
data Ctx = Ctx
@@ -23,7 +31,7 @@ type CAT s c = ResourceT [Ch] (s,c)
type CtxM c = ResourceT Ctx c IO
newtype CA s c v = CA { unCA :: CAT s c (CtxM c) v }
- deriving (Monad)
+ deriving (Functor, Applicative, Monad)
class (Monad m) => MonadCA m where
type CtxLabel m
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index d044f613bb..fec03b6afc 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -13,13 +13,14 @@ test('T1969',
# 19 (x86/OS X)
# 2013-02-10 13 (x86/Windows)
# 2013-02-10 14 (x86/OSX)
- (wordsize(64), 27, 10)]),
+ (wordsize(64), 30, 10)]),
# 28 (amd64/Linux)
# 34 (amd64/Linux)
# 2012-09-20 23 (amd64/Linux)
# 2012-10-03 25 (amd64/Linux if .hi exists)
# 2013-02-13 23, but unstable so increased to 10% range
# 2013-02-13 27, very unstable!
+ # 2013-09-11 30 (amd64/Linux)
compiler_stats_num_field('max_bytes_used',
[(platform('i386-unknown-mingw32'), 5094914, 2),
# 2010-05-17 5717704 (x86/Windows)
@@ -28,8 +29,8 @@ test('T1969',
(wordsize(32), 6149572, 1),
# 6707308 (x86/OS X)
# 2009-12-31 6149572 (x86/Linux)
- (wordsize(64), 9000000, 20)]),
- # looks like the peak is around 10M, but we're
+ (wordsize(64), 11000000, 20)]),
+ # looks like the peak is around ~10M, but we're
# unlikely to GC exactly on the peak.
# varies quite a lot with CLEANUP and BINDIST,
# hence 10% range.
@@ -170,11 +171,12 @@ test('T3064',
compiler_stats_num_field('peak_megabytes_allocated',
[(wordsize(32), 14, 1),
# expected value: 14 (x86/Linux 28-06-2012):
- (wordsize(64), 26, 20)]),
+ (wordsize(64), 30, 20)]),
# (amd64/Linux): 18
# (amd64/Linux) 2012-02-07: 26
# (amd64/Linux) 2013-02-12: 23; increased range to 10%
# (amd64/Linux) 2013-04-03: 26
+ # (amd64/Linux) 2013-09-11: 30; result of AMP patch
# Increased range to 20%. peak-usage varies from 22 to 26,
# depending on whether the old .hi file exists
@@ -182,21 +184,22 @@ test('T3064',
[(wordsize(32), 111189536, 10),
# expected value: 56380288 (x86/Linux) (28/6/2011)
# 111189536 (x86/Windows) (30/10/12)
- (wordsize(64), 236404384, 5)]),
+ (wordsize(64), 290165632, 5)]),
# (amd64/Linux) (28/06/2011): 73259544
# (amd64/Linux) (07/02/2013): 224798696
# (amd64/Linux) (02/08/2013): 236404384, increase from roles
-
+ # (amd64/Linux) (11/09/2013): 290165632, increase from AMP warnings
compiler_stats_num_field('max_bytes_used',
[(wordsize(32), 5511604, 20),
# expected value: 2247016 (x86/Linux) (28/6/2011):
- (wordsize(64), 9211816, 20)]),
+ (wordsize(64), 12000480, 20)]),
# (amd64/Linux, intree) (28/06/2011): 4032024
# (amd64/Linux, intree) (07/02/2013): 9819288
# (amd64/Linux) (14/02/2013): 8687360
# (amd64/Linux) (18/02/2013): 9397488
# (amd64/Linux) (02/08/2013): 10742536, increase from roles
# (amd64/Linux) (19/08/2013): 9211816, decrease apparently from better eta reduction
+ # (amd64/Linux) (11/09/2013): 12000480, increase from AMP warnings
# 933cdf15a2d85229d3df04b437da31fdfbf4961f
only_ways(['normal'])
],
diff --git a/testsuite/tests/rename/should_compile/T7145b.hs b/testsuite/tests/rename/should_compile/T7145b.hs
index b9dcef7085..54200c320f 100644
--- a/testsuite/tests/rename/should_compile/T7145b.hs
+++ b/testsuite/tests/rename/should_compile/T7145b.hs
@@ -1,5 +1,7 @@
{-# LANGUAGE CPP #-}
-
+#if __GLASGOW_HASKELL__ >= 707
+{-# OPTIONS_GHC -fno-warn-amp #-}
+#endif
module T7145b ( A.Applicative(pure) ) where
import qualified Control.Applicative as A
diff --git a/testsuite/tests/rename/should_compile/T7145b.stderr b/testsuite/tests/rename/should_compile/T7145b.stderr
index bc3d1865f8..1839bf7ad3 100644
--- a/testsuite/tests/rename/should_compile/T7145b.stderr
+++ b/testsuite/tests/rename/should_compile/T7145b.stderr
@@ -1,2 +1,2 @@
-T7145b.hs:8:1: Warning: Defined but not used: ‛pure’
+T7145b.hs:10:1: Warning: Defined but not used: ‛pure’
diff --git a/testsuite/tests/typecheck/should_compile/holes2.stderr b/testsuite/tests/typecheck/should_compile/holes2.stderr
index 4e0befe971..c034c87ff8 100644
--- a/testsuite/tests/typecheck/should_compile/holes2.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes2.stderr
@@ -7,7 +7,7 @@ holes2.hs:5:5: Warning:
instance Show Float -- Defined in ‛GHC.Float’
instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
-- Defined in ‛GHC.Real’
- ...plus 23 others
+ ...plus 24 others
In the expression: show _
In an equation for ‛f’: f = show _
diff --git a/testsuite/tests/typecheck/should_fail/T5095.stderr b/testsuite/tests/typecheck/should_fail/T5095.stderr
index 166bc5e2cf..28dd53ae6b 100644
--- a/testsuite/tests/typecheck/should_fail/T5095.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5095.stderr
@@ -56,6 +56,8 @@ T5095.hs:9:11:
instance Eq Ordering -- Defined in ‛GHC.Classes’
instance Eq GHC.Types.Word -- Defined in ‛GHC.Classes’
instance Eq a => Eq [a] -- Defined in ‛GHC.Classes’
+ instance Eq a => Eq (Control.Applicative.ZipList a)
+ -- Defined in ‛Control.Applicative’
instance Eq Integer -- Defined in ‛integer-gmp:GHC.Integer.Type’
(The choice depends on the instantiation of ‛a’
To pick the first instance above, use -XIncoherentInstances
diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
index b533d36509..828de022e6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -11,6 +11,6 @@ tcfail072.hs:23:13:
-- Defined in ‛GHC.Real’
instance Ord () -- Defined in ‛GHC.Classes’
instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‛GHC.Classes’
- ...plus 22 others
+ ...plus 23 others
In the expression: g A
In an equation for ‛g’: g (B _ _) = g A
diff --git a/testsuite/tests/typecheck/should_fail/tcfail083.stderr b/testsuite/tests/typecheck/should_fail/tcfail083.stderr
index dc4ce59e9c..360383879f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail083.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail083.stderr
@@ -14,7 +14,7 @@ tcfail083.hs:8:53:
instance Show Bar -- Defined at tcfail083.hs:3:43
instance Show Double -- Defined in ‛GHC.Float’
instance Show Float -- Defined in ‛GHC.Float’
- ...plus 24 others
+ ...plus 25 others
In the expression: print (f, b)
In an equation for ‛display’:
display (State {bar = Bar {flag = f, baz = b}}) = print (f, b)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
index 72eafd88d7..1d840d4624 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
@@ -10,7 +10,7 @@ tcfail133.hs:68:7:
instance Show One -- Defined at tcfail133.hs:9:28
instance (Show a, Show b, Number a, Digit b) => Show (a :@ b)
-- Defined at tcfail133.hs:11:54
- ...plus 26 others
+ ...plus 27 others
In the expression: show
In the expression: show $ add (One :@ Zero) (One :@ One)
In an equation for ‛foo’: