Commit 47a0c363 authored by Austin Seipp's avatar Austin Seipp
Browse files

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: default avatarAustin Seipp <austin@well-typed.com>
parent 13f1caad
......@@ -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
......@@ -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
......@@ -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]
......
{-# 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
......
......@@ -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'])
],
......
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 707
{-# OPTIONS_GHC -fno-warn-amp #-}
#endif
module T7145b ( A.Applicative(pure) ) where
import qualified Control.Applicative as A
......
T7145b.hs:8:1: Warning: Defined but not used: ‛pure’
T7145b.hs:10:1: Warning: Defined but not used: ‛pure’
......@@ -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 _
......
......@@ -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
......
......@@ -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
......@@ -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)
......@@ -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’:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment