summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2011-12-05 13:17:26 -0800
committerDavid Terei <davidterei@gmail.com>2011-12-05 13:17:26 -0800
commitd77aedefe4b4d4f9667182eb5faad528d99bed06 (patch)
treec8908cdacbc72ddcd6ef7857aecd417ae8d339d9 /testsuite/tests
parentc743f1fd9e274a2c6e88217296c6348df3d3530b (diff)
parentb4d0a6f1b723d4390e6371193a7b28c4684087b8 (diff)
downloadhaskell-d77aedefe4b4d4f9667182eb5faad528d99bed06.tar.gz
Merge branch 'master' of http://darcs.haskell.org/testsuite
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/indexed-types/should_compile/T4120.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_compile/all.T2
-rw-r--r--testsuite/tests/profiling/should_run/all.T4
-rw-r--r--testsuite/tests/profiling/should_run/callstack001.stdout4
-rw-r--r--testsuite/tests/profiling/should_run/callstack002.stderr24
-rw-r--r--testsuite/tests/profiling/should_run/callstack002.stdout13
-rw-r--r--testsuite/tests/profiling/should_run/scc002.hs2
-rw-r--r--testsuite/tests/profiling/should_run/scc002.prof.sample36
-rw-r--r--testsuite/tests/typecheck/should_compile/T5595.hs14
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail174.stderr16
11 files changed, 70 insertions, 54 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T4120.stderr b/testsuite/tests/indexed-types/should_compile/T4120.stderr
index d957620b78..e69de29bb2 100644
--- a/testsuite/tests/indexed-types/should_compile/T4120.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T4120.stderr
@@ -1,8 +0,0 @@
-
-T4120.hs:17:10:
- Couldn't match expected type `forall s. MVector s a'
- with actual type `forall s. Mutable Vector s a0'
- Expected type: (forall s. MVector s a) -> Int
- Actual type: (forall s. Mutable Vector s a0) -> Int
- In the expression: create1
- In an equation for `create': create = create1
diff --git a/testsuite/tests/indexed-types/should_compile/all.T b/testsuite/tests/indexed-types/should_compile/all.T
index e7827bed4f..9e37129f2c 100644
--- a/testsuite/tests/indexed-types/should_compile/all.T
+++ b/testsuite/tests/indexed-types/should_compile/all.T
@@ -146,7 +146,7 @@ test('IndTypesPerf',
run_command,
['$MAKE -s --no-print-directory IndTypesPerf'])
-test('T4120', normal, compile_fail, [''])
+test('T4120', normal, compile, [''])
test('T3787', reqlib('mtl'), compile, [''])
test('T3826', normal, compile, [''])
test('T4200', normal, compile, [''])
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T
index 18c1eec818..154d3829b8 100644
--- a/testsuite/tests/profiling/should_run/all.T
+++ b/testsuite/tests/profiling/should_run/all.T
@@ -102,8 +102,8 @@ test('T5559', # unicode in cost centre names
test('callstack001',
[ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
- compile_and_run, ['-fno-state-hack'])
+ compile_and_run, ['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
test('callstack002',
[ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
- compile_and_run, ['-fno-full-laziness -fno-state-hack'])
+ compile_and_run, ['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
diff --git a/testsuite/tests/profiling/should_run/callstack001.stdout b/testsuite/tests/profiling/should_run/callstack001.stdout
index 7c338718ee..f5a8580d78 100644
--- a/testsuite/tests/profiling/should_run/callstack001.stdout
+++ b/testsuite/tests/profiling/should_run/callstack001.stdout
@@ -1,2 +1,2 @@
-["Main.CAF","Main.main","Main.mapM","Main.mapM.go","Main.f"]
-["Main.CAF","Main.main","Main.mapM","Main.mapM.go","Main.f"]
+["Main.CAF (<entire-module>)","Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:13:17-19)","Main.f (callstack001.hs:7:10-35)"]
+["Main.CAF (<entire-module>)","Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:13:17-19)","Main.f (callstack001.hs:7:10-35)"]
diff --git a/testsuite/tests/profiling/should_run/callstack002.stderr b/testsuite/tests/profiling/should_run/callstack002.stderr
index b1eaf4fa8c..21891b6d9c 100644
--- a/testsuite/tests/profiling/should_run/callstack002.stderr
+++ b/testsuite/tests/profiling/should_run/callstack002.stderr
@@ -1,16 +1,16 @@
f: 42
Stack trace:
- Main.CAF
- Main.main
- Main.main.xs
- Main.map
- Main.map.go
- Main.f
+ Main.CAF (<entire-module>)
+ Main.main.xs (callstack002.hs:18:12-24)
+ Main.map (callstack002.hs:13:12-16)
+ Main.map.go (callstack002.hs:15:21-34)
+ Main.map.go (callstack002.hs:15:21-23)
+ Main.f (callstack002.hs:10:7-43)
f: 43
Stack trace:
- Main.CAF
- Main.main
- Main.main.xs
- Main.map
- Main.map.go
- Main.f
+ Main.CAF (<entire-module>)
+ Main.main.xs (callstack002.hs:18:12-24)
+ Main.map (callstack002.hs:13:12-16)
+ Main.map.go (callstack002.hs:15:21-34)
+ Main.map.go (callstack002.hs:15:21-23)
+ Main.f (callstack002.hs:10:7-43)
diff --git a/testsuite/tests/profiling/should_run/callstack002.stdout b/testsuite/tests/profiling/should_run/callstack002.stdout
index a68ecf9dba..ae605e20e9 100644
--- a/testsuite/tests/profiling/should_run/callstack002.stdout
+++ b/testsuite/tests/profiling/should_run/callstack002.stdout
@@ -1,8 +1,9 @@
[84,86]
Stack trace:
- Main.CAF
- Main.main
- Main.main.xs
- Main.map
- Main.map.go
- Main.f
+ Main.CAF (<entire-module>)
+ Main.main.xs (callstack002.hs:18:12-24)
+ Main.map (callstack002.hs:13:12-16)
+ Main.map.go (callstack002.hs:15:21-34)
+ Main.map.go (callstack002.hs:15:21-23)
+ Main.f (callstack002.hs:10:7-43)
+ Main.f (callstack002.hs:10:38-42)
diff --git a/testsuite/tests/profiling/should_run/scc002.hs b/testsuite/tests/profiling/should_run/scc002.hs
index edf0670764..5e1f402900 100644
--- a/testsuite/tests/profiling/should_run/scc002.hs
+++ b/testsuite/tests/profiling/should_run/scc002.hs
@@ -23,4 +23,4 @@ Note the 2 entries for yan.\, the lambda expression inside yan.
big :: Int -> Int
big x = (array (0,1000000) [(0,x)] :: UArray Int Int) ! 0
-yan = {-# SCC yan #-} let e = big 20 in \x -> {-# SCC yan1 #-} x + e
+yan = let e = big 20 in \x -> {-# SCC yan1 #-} x + e
diff --git a/testsuite/tests/profiling/should_run/scc002.prof.sample b/testsuite/tests/profiling/should_run/scc002.prof.sample
index c564aeb1e1..1e2e0ca213 100644
--- a/testsuite/tests/profiling/should_run/scc002.prof.sample
+++ b/testsuite/tests/profiling/should_run/scc002.prof.sample
@@ -1,27 +1,29 @@
- Wed Oct 26 14:19 2011 Time and Allocation Profiling Report (Final)
+ Fri Dec 2 12:54 2011 Time and Allocation Profiling Report (Final)
- scc002 +RTS -p -RTS
+ scc002 +RTS -hc -p -RTS
- total time = 0.00 secs (0 ticks @ 20 ms)
- total alloc = 4,045,376 bytes (excludes profiling overheads)
+ total time = 0.01 secs (15 ticks @ 1000 us, 1 processor)
+ total alloc = 8,049,336 bytes (excludes profiling overheads)
COST CENTRE MODULE %time %alloc
-big Main 0.0 98.9
+big Main 100.0 99.4
individual inherited
COST CENTRE MODULE no. entries %time %alloc %time %alloc
-MAIN MAIN 106 0 0.0 0.0 0.0 100.0
- CAF Main 211 0 0.0 0.0 0.0 99.1
- yan Main 213 2 0.0 0.0 0.0 98.9
- yan.e Main 217 1 0.0 0.0 0.0 98.9
- big Main 218 1 0.0 98.9 0.0 98.9
- main Main 212 1 0.0 0.2 0.0 0.2
- yan Main 214 0 0.0 0.0 0.0 0.0
- yan.\ Main 215 2 0.0 0.0 0.0 0.0
- yan1 Main 216 2 0.0 0.0 0.0 0.0
- CAF GHC.Conc.Signal 206 0 0.0 0.0 0.0 0.0
- CAF GHC.IO.Encoding.Iconv 195 0 0.0 0.0 0.0 0.0
- CAF GHC.IO.Handle.FD 187 0 0.0 0.8 0.0 0.8
+MAIN MAIN 105 0 0.0 0.0 100.0 100.0
+ main Main 211 0 0.0 0.1 0.0 0.1
+ CAF GHC.IO.Handle.FD 136 0 0.0 0.4 0.0 0.4
+ CAF GHC.IO.Encoding.Iconv 128 0 0.0 0.0 0.0 0.0
+ CAF GHC.IO.Encoding 126 0 0.0 0.0 0.0 0.0
+ CAF GHC.Conc.Signal 117 0 0.0 0.0 0.0 0.0
+ CAF Main 112 0 0.0 0.0 100.0 99.4
+ yan Main 212 1 0.0 0.0 100.0 99.4
+ yan.e Main 216 1 0.0 0.0 100.0 99.4
+ big Main 217 1 100.0 99.4 100.0 99.4
+ main Main 210 1 0.0 0.0 0.0 0.0
+ yan Main 213 0 0.0 0.0 0.0 0.0
+ yan.\ Main 214 2 0.0 0.0 0.0 0.0
+ yan1 Main 215 2 0.0 0.0 0.0 0.0
diff --git a/testsuite/tests/typecheck/should_compile/T5595.hs b/testsuite/tests/typecheck/should_compile/T5595.hs
new file mode 100644
index 0000000000..e7599cf2fb
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T5595.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE UnicodeSyntax, RankNTypes, TypeFamilies #-}
+module T5595 where
+
+class MonadTransControl t where
+ type St t :: * → *
+
+ liftControl :: Monad m =>(Run t → m a) → t m a
+
+ restore :: Monad o => St t y → t o y
+
+type Run t = forall n b. Monad n => t n b → n (St t b)
+
+foo :: (Monad m, MonadTransControl t) => (Run t -> m a) -> t m a
+foo f = liftControl f
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 5d62df91d8..0d40a0262c 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -367,4 +367,5 @@ test('T5514', normal, compile, [''])
test('T5581', normal, compile, [''])
test('T5655', normal, compile, [''])
test('T5643', normal, compile, [''])
+test('T5595', normal, compile, [''])
diff --git a/testsuite/tests/typecheck/should_fail/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
index b9bdb0a487..cf8c4cc9c0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
@@ -7,16 +7,22 @@ tcfail174.hs:9:10:
In an equation for `g': g = Base id
tcfail174.hs:13:14:
- Couldn't match expected type `forall x. x -> a0'
- with actual type `forall a. a -> a'
- Expected type: Capture (forall x. x -> a0)
+ Couldn't match type `a' with `a1'
+ `a' is a rigid type variable bound by
+ the inferred type of h1 :: Capture a at tcfail174.hs:13:1
+ `a1' is a rigid type variable bound by
+ the type forall a. a -> a at tcfail174.hs:13:14
+ Expected type: Capture (forall x. x -> a)
Actual type: Capture (forall a. a -> a)
In the first argument of `Capture', namely `g'
In the expression: Capture g
tcfail174.hs:16:14:
- Couldn't match expected type `forall x. x -> b'
- with actual type `forall a. a -> a'
+ Couldn't match type `a' with `b'
+ `a' is a rigid type variable bound by
+ the type forall a. a -> a at tcfail174.hs:16:14
+ `b' is a rigid type variable bound by
+ the type signature for h2 :: Capture b at tcfail174.hs:16:1
Expected type: Capture (forall x. x -> b)
Actual type: Capture (forall a. a -> a)
In the first argument of `Capture', namely `g'