summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-02-13 17:39:01 +0000
committerIan Lynagh <ian@well-typed.com>2013-02-13 17:39:01 +0000
commitc30fba27c50869744cde80f8dd0cd0fe6b064ad9 (patch)
treeb0b40dc17303fde9c8ce51df077dc7f7f8d97d11
parenta848c40e7264efa0e657944a8923784de3eb0de9 (diff)
parent9781d940620b82da63b605571fc519a3421b1ef8 (diff)
downloadhaskell-c30fba27c50869744cde80f8dd0cd0fe6b064ad9.tar.gz
Merge branch 'master' of darcs.haskell.org:/srv/darcs//testsuite
-rw-r--r--testsuite/tests/generics/GenNewtype.hs10
-rw-r--r--testsuite/tests/generics/GenNewtype.stdout1
-rw-r--r--testsuite/tests/generics/all.T1
-rw-r--r--testsuite/tests/perf/compiler/all.T6
-rw-r--r--testsuite/tests/perf/haddock/all.T6
-rw-r--r--testsuite/tests/th/TH_emptycase.hs4
-rw-r--r--testsuite/tests/th/TH_emptycase.stderr6
-rw-r--r--testsuite/tests/th/all.T2
-rw-r--r--testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs9
-rw-r--r--testsuite/tests/typecheck/should_run/T3731.hs1
10 files changed, 25 insertions, 21 deletions
diff --git a/testsuite/tests/generics/GenNewtype.hs b/testsuite/tests/generics/GenNewtype.hs
new file mode 100644
index 0000000000..c1161fe7f9
--- /dev/null
+++ b/testsuite/tests/generics/GenNewtype.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE DeriveGeneric #-}
+
+module Main where
+
+import GHC.Generics
+
+data X = X deriving Generic
+newtype Y = Y X deriving Generic
+
+main = print [isNewtype (from X), isNewtype (from (Y X))]
diff --git a/testsuite/tests/generics/GenNewtype.stdout b/testsuite/tests/generics/GenNewtype.stdout
new file mode 100644
index 0000000000..a9896e7d70
--- /dev/null
+++ b/testsuite/tests/generics/GenNewtype.stdout
@@ -0,0 +1 @@
+[False,True]
diff --git a/testsuite/tests/generics/all.T b/testsuite/tests/generics/all.T
index 1541a4725c..7a88487fec 100644
--- a/testsuite/tests/generics/all.T
+++ b/testsuite/tests/generics/all.T
@@ -9,6 +9,7 @@ test('GenCannotDoRep0', normal, compile_fail, [''])
test('GenCannotDoRep1', normal, compile_fail, [''])
test('GenCannotDoRep2', normal, compile_fail, [''])
test('T5884', normal, compile, [''])
+test('GenNewtype', normal, compile_and_run, [''])
test('GenCanDoRep1_0', normal, compile, [''])
test('GenDerivOutput1_0', normal, compile, ['-dsuppress-uniques'])
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index 50c152124b..a7ac4e2d81 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -13,11 +13,12 @@ test('T1969',
# 19 (x86/OS X)
# 2013-02-10 13 (x86/Windows)
# 2013-02-10 14 (x86/OSX)
- (wordsize(64), 25, 1)]),
+ (wordsize(64), 23, 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
compiler_stats_num_field('max_bytes_used',
[(platform('i386-unknown-mingw32'), 5094914, 2),
# 2010-05-17 5717704 (x86/Windows)
@@ -160,10 +161,11 @@ test('T3064',
compiler_stats_num_field('peak_megabytes_allocated',
[(wordsize(32), 14, 1),
# expected value: 14 (x86/Linux 28-06-2012):
- (wordsize(64), 23, 1)]),
+ (wordsize(64), 26, 10)]),
# (amd64/Linux): 18
# (amd64/Linux) 2012-02-07: 26
# (amd64/Linux) 2013-02-12: 23
+ # (amd64/Linux) 2013-02-13: back to 26; increased range to 10%
compiler_stats_num_field('bytes allocated',
[(wordsize(32), 111189536, 10),
diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T
index ba25e146b5..e1fdd869e8 100644
--- a/testsuite/tests/perf/haddock/all.T
+++ b/testsuite/tests/perf/haddock/all.T
@@ -25,12 +25,13 @@ test('haddock.base',
,(wordsize(32), 52237984, 1)])
# 2013-02-10: 52237984 (x86/OSX)
,stats_num_field('bytes allocated',
- [(wordsize(64), 6282746976, 5)
+ [(wordsize(64), 5184155784, 5)
# 2012-08-14: 5920822352 (amd64/Linux)
# 2012-09-20: 5829972376 (amd64/Linux)
# 2012-10-08: 5902601224 (amd64/Linux)
# 2013-01-17: 6064874536 (x86_64/Linux)
# 2013-02-10: 6282746976 (x86_64/Linux)
+ # 2013-02-13: 5184155784 (x86_64/Linux)
,(platform('i386-unknown-mingw32'), 3358693084, 1)
# 2013-02-10: 3358693084 (x86/Windows)
,(wordsize(32), 3146596848, 1)])
@@ -67,10 +68,11 @@ test('haddock.Cabal',
# 2012-08-14: 47461532 (x86/OSX)
# 2013-02-10: 46563344 (x86/OSX)
,stats_num_field('bytes allocated',
- [(wordsize(64), 3373401360, 2)
+ [(wordsize(64), 2809307464, 5)
# 2012-08-14: 3255435248 (amd64/Linux)
# 2012-08-29: 3324606664 (amd64/Linux, new codegen)
# 2012-10-08: 3373401360 (amd64/Linux)
+ # 2013-02-13: 2809307464 (amd64/Linux)
,(platform('i386-unknown-mingw32'), 1906532680, 1)
# 2012-10-30: 1733638168 (x86/Windows)
# 2013-02-10: 1906532680 (x86/Windows)
diff --git a/testsuite/tests/th/TH_emptycase.hs b/testsuite/tests/th/TH_emptycase.hs
index d68ca9a8ee..fc75cfe5b0 100644
--- a/testsuite/tests/th/TH_emptycase.hs
+++ b/testsuite/tests/th/TH_emptycase.hs
@@ -1,6 +1,6 @@
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskell, EmptyCase #-}
-- Trac #2431: empty case expression
--- currently rejected
+-- now accepted
module Main where
diff --git a/testsuite/tests/th/TH_emptycase.stderr b/testsuite/tests/th/TH_emptycase.stderr
deleted file mode 100644
index 2de068769b..0000000000
--- a/testsuite/tests/th/TH_emptycase.stderr
+++ /dev/null
@@ -1,6 +0,0 @@
-
-TH_emptycase.hs:10:7:
- Case expression with no alternatives
- When splicing a TH expression: case 'a' of
- In the expression: $(caseE (litE $ CharL 'a') [])
- In an equation for `f': f = $(caseE (litE $ CharL 'a') [])
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index b279dcd6e2..fa185aa4ca 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -138,7 +138,7 @@ test('T2817', normal, compile, ['-v0'])
test('T2713', normal, compile_fail, ['-v0'])
test('T2674', normal, compile_fail, ['-v0'])
test('T2931', normal, compile, ['-v0'])
-test('TH_emptycase', normal, compile_fail, ['-v0'])
+test('TH_emptycase', normal, compile, ['-v0'])
test('T2386', extra_clean(['T2386_Lib.hi', 'T2386_Lib.o']),
run_command,
diff --git a/testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs b/testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs
index c7fad91395..d444db7058 100644
--- a/testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs
+++ b/testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs
@@ -21,11 +21,6 @@ module T1735_Help.Basics (
import Data.Typeable
import T1735_Help.Context
-#ifdef __HADDOCK__
-data Proxy
-#else
-data Proxy (a :: * -> *)
-#endif
------------------------------------------------------------------------------
-- The ingenious Data class
@@ -61,14 +56,14 @@ class (Typeable a, Sat (ctx a)) => Data ctx a
dataTypeOf _ _ = undefined
-- | Mediate types and unary type constructors
- dataCast1 :: Typeable1 t
+ dataCast1 :: Typeable t
=> Proxy ctx
-> (forall b. Data ctx b => w (t b))
-> Maybe (w a)
dataCast1 _ _ = Nothing
-- | Mediate types and binary type constructors
- dataCast2 :: Typeable2 t
+ dataCast2 :: Typeable t
=> Proxy ctx
-> (forall b c. (Data ctx b, Data ctx c) => w (t b c))
-> Maybe (w a)
diff --git a/testsuite/tests/typecheck/should_run/T3731.hs b/testsuite/tests/typecheck/should_run/T3731.hs
index af858e570a..3024629eca 100644
--- a/testsuite/tests/typecheck/should_run/T3731.hs
+++ b/testsuite/tests/typecheck/should_run/T3731.hs
@@ -13,7 +13,6 @@ import Data.Typeable
class Sat a where
dict :: a
-data Proxy (a :: * -> *)
class ( Sat (ctx a)) => Data ctx a where
gunfold :: Proxy ctx