summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorDavid Feuer <David.Feuer@gmail.com>2014-10-28 15:26:39 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2014-10-28 15:36:09 +0100
commit75979f3661ff16ec44528a23005ac1be2b9683fe (patch)
treeee593bb346641c4f31139a67883762042f9e7653 /testsuite/tests
parent98ed815f658bdf9cc0299a4818244c3a56c20487 (diff)
downloadhaskell-75979f3661ff16ec44528a23005ac1be2b9683fe.tar.gz
base: Refactor/clean-up *List modules
This gets rid of all hand-unboxing in `GHC.List` and moves `Foldable` requirements from `Data.OldList` into `GHC.List` (preparatory work for addressing #9716). Specifically, this moves the definition of `maximum`, `minimum`, `foldl'`, `foldl1`, `foldl1'`, `sum`, and `product` into `GHC.List` (which now needs to import `GHC.Num`) Make `take`, `drop`, `length`, and `!!` generally saner (see also #9510) Performance overall seems minimally affected. Some things go up; some things go down; nothing moves horribly much. The code is much easier to read. Differential Revision: https://phabricator.haskell.org/D380
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/perf/compiler/T4007.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/T3772.stdout25
-rw-r--r--testsuite/tests/simplCore/should_compile/T7360.stderr8
3 files changed, 17 insertions, 18 deletions
diff --git a/testsuite/tests/perf/compiler/T4007.stdout b/testsuite/tests/perf/compiler/T4007.stdout
index aabd6101cd..c924781e0e 100644
--- a/testsuite/tests/perf/compiler/T4007.stdout
+++ b/testsuite/tests/perf/compiler/T4007.stdout
@@ -7,7 +7,7 @@ Rule fired: Class op return
Rule fired: Class op foldr
Rule fired: Class op >>
Rule fired: Class op return
-Rule fired: <=#
+Rule fired: <#
Rule fired: tagToEnum#
Rule fired: Class op foldr
Rule fired: fold/build
diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout
index 6c7735eed6..506e342012 100644
--- a/testsuite/tests/simplCore/should_compile/T3772.stdout
+++ b/testsuite/tests/simplCore/should_compile/T3772.stdout
@@ -1,16 +1,15 @@
==================== Tidy Core ====================
-Result size of Tidy Core = {terms: 29, types: 12, coercions: 0}
+Result size of Tidy Core = {terms: 26, types: 11, coercions: 0}
Rec {
-xs :: GHC.Prim.Int# -> ()
-[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>]
-xs =
- \ (m :: GHC.Prim.Int#) ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# m 1)
- of _ [Occ=Dead] {
- GHC.Types.False -> xs (GHC.Prim.-# m 1);
- GHC.Types.True -> GHC.Tuple.()
+$wxs :: GHC.Prim.Int# -> ()
+[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>]
+$wxs =
+ \ (ww :: GHC.Prim.Int#) ->
+ case ww of ds1 {
+ __DEFAULT -> $wxs (GHC.Prim.-# ds1 1);
+ 1 -> GHC.Tuple.()
}
end Rec }
@@ -18,11 +17,11 @@ T3772.foo [InlPrag=NOINLINE] :: GHC.Types.Int -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U(U)>]
T3772.foo =
\ (n :: GHC.Types.Int) ->
- case n of _ [Occ=Dead] { GHC.Types.I# n# ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# n# 0)
+ case n of _ [Occ=Dead] { GHC.Types.I# y ->
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# 0 y)
of _ [Occ=Dead] {
- GHC.Types.False -> xs n#;
- GHC.Types.True -> GHC.Tuple.()
+ GHC.Types.False -> GHC.Tuple.();
+ GHC.Types.True -> $wxs y
}
}
diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr
index c6c0563cac..5d10285099 100644
--- a/testsuite/tests/simplCore/should_compile/T7360.stderr
+++ b/testsuite/tests/simplCore/should_compile/T7360.stderr
@@ -53,8 +53,8 @@ T7360.fun2 :: forall a. [a] -> ((), GHC.Types.Int)
case x of wild {
[] -> T7360.fun3;
: _ [Occ=Dead] _ [Occ=Dead] ->
- case GHC.List.$wlenAcc @ a wild 0 of ww { __DEFAULT ->
- GHC.Types.I# ww
+ case GHC.List.$wlenAcc @ a wild 0 of ww2 { __DEFAULT ->
+ GHC.Types.I# ww2
}
})}]
T7360.fun2 =
@@ -63,8 +63,8 @@ T7360.fun2 =
case x of wild {
[] -> T7360.fun3;
: ds ds1 ->
- case GHC.List.$wlenAcc @ a wild 0 of ww { __DEFAULT ->
- GHC.Types.I# ww
+ case GHC.List.$wlenAcc @ a wild 0 of ww2 { __DEFAULT ->
+ GHC.Types.I# ww2
}
})