summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2016-03-30 13:22:26 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2016-04-06 22:06:10 +0200
commit2265c849bf39a5b0eb10972681a9586c215408b5 (patch)
tree949c6ac6ee51d536f28bde30865fec133550f63c /testsuite/tests/simplCore/should_compile
parent1a8d61ca1a54820d2bc30c6a964312faf76d0635 (diff)
downloadhaskell-2265c849bf39a5b0eb10972681a9586c215408b5.tar.gz
Core pretty printer: Omit wild case binders
as they (especially their id info with absence information) clutter the output too much. They come back with debug_on. Differential Revision: https://phabricator.haskell.org/D2072
Diffstat (limited to 'testsuite/tests/simplCore/should_compile')
-rw-r--r--testsuite/tests/simplCore/should_compile/T3717.stderr4
-rw-r--r--testsuite/tests/simplCore/should_compile/T3772.stdout5
-rw-r--r--testsuite/tests/simplCore/should_compile/T4908.stderr8
-rw-r--r--testsuite/tests/simplCore/should_compile/T4930.stderr10
-rw-r--r--testsuite/tests/simplCore/should_compile/T5366.stdout3
-rw-r--r--testsuite/tests/simplCore/should_compile/T7360.stderr12
-rw-r--r--testsuite/tests/simplCore/should_compile/T7865.stdout4
-rw-r--r--testsuite/tests/simplCore/should_compile/spec-inline.stderr28
8 files changed, 31 insertions, 43 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T3717.stderr b/testsuite/tests/simplCore/should_compile/T3717.stderr
index 66a14f1c9b..a7c1e55c52 100644
--- a/testsuite/tests/simplCore/should_compile/T3717.stderr
+++ b/testsuite/tests/simplCore/should_compile/T3717.stderr
@@ -53,12 +53,12 @@ foo [InlPrag=INLINE[0]] :: Int -> Int
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (w [Occ=Once!] :: Int) ->
- case w of _ [Occ=Dead] { GHC.Types.I# ww1 [Occ=Once] ->
+ case w of { GHC.Types.I# ww1 [Occ=Once] ->
case T3717.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 }
}}]
foo =
\ (w :: Int) ->
- case w of _ [Occ=Dead] { GHC.Types.I# ww1 ->
+ case w of { GHC.Types.I# ww1 ->
case T3717.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 }
}
diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout
index fdbcc88bae..d70c0eee55 100644
--- a/testsuite/tests/simplCore/should_compile/T3772.stdout
+++ b/testsuite/tests/simplCore/should_compile/T3772.stdout
@@ -19,9 +19,8 @@ foo [InlPrag=NOINLINE] :: Int -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=<S(S),1*U(U)>]
foo =
\ (n :: Int) ->
- case n of _ [Occ=Dead] { GHC.Types.I# y ->
- case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# 0# y)
- of _ [Occ=Dead] {
+ case n of { GHC.Types.I# y ->
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# 0# y) of {
False -> GHC.Tuple.();
True -> $wxs y
}
diff --git a/testsuite/tests/simplCore/should_compile/T4908.stderr b/testsuite/tests/simplCore/should_compile/T4908.stderr
index 2137dd8942..947d16a206 100644
--- a/testsuite/tests/simplCore/should_compile/T4908.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4908.stderr
@@ -58,8 +58,8 @@ T4908.$wf =
\ (ww :: Int#) (w :: (Int, Int)) ->
case ww of ds {
__DEFAULT ->
- case w of _ [Occ=Dead] { (a, b) ->
- case b of _ [Occ=Dead] { I# ds1 ->
+ case w of { (a, b) ->
+ case b of { I# ds1 ->
case ds1 of ds2 {
__DEFAULT -> T4908.f_$s$wf a ds2 (-# ds 1#);
0# -> GHC.Types.True
@@ -79,10 +79,10 @@ f [InlPrag=INLINE[0]] :: Int -> (Int, Int) -> Bool
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
Tmpl= \ (w [Occ=Once!] :: Int) (w1 [Occ=Once] :: (Int, Int)) ->
- case w of _ [Occ=Dead] { I# ww1 [Occ=Once] -> T4908.$wf ww1 w1 }}]
+ case w of { I# ww1 [Occ=Once] -> T4908.$wf ww1 w1 }}]
f =
\ (w :: Int) (w1 :: (Int, Int)) ->
- case w of _ [Occ=Dead] { I# ww1 -> T4908.$wf ww1 w1 }
+ case w of { I# ww1 -> T4908.$wf ww1 w1 }
------ Local rules for imported ids --------
diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr
index e6045a31ab..7e51aa68be 100644
--- a/testsuite/tests/simplCore/should_compile/T4930.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4930.stderr
@@ -37,13 +37,13 @@ T4930.$wfoo [InlPrag=[0], Occ=LoopBreaker]
[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>]
T4930.$wfoo =
\ (ww :: GHC.Prim.Int#) ->
- case case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# ww 5#)
- of _ [Occ=Dead] {
+ case case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# ww 5#) of {
False -> GHC.Types.I# (GHC.Prim.+# ww 2#);
True ->
case T4930.$wfoo ww of ww1 { __DEFAULT -> GHC.Types.I# ww1 }
}
- of _ [Occ=Dead] { GHC.Types.I# ipv ->
+ of
+ { GHC.Types.I# ipv ->
GHC.Prim.+# ww 5#
}
end Rec }
@@ -58,12 +58,12 @@ foo [InlPrag=INLINE[0]] :: Int -> Int
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (w [Occ=Once!] :: Int) ->
- case w of _ [Occ=Dead] { GHC.Types.I# ww1 [Occ=Once] ->
+ case w of { GHC.Types.I# ww1 [Occ=Once] ->
case T4930.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 }
}}]
foo =
\ (w :: Int) ->
- case w of _ [Occ=Dead] { GHC.Types.I# ww1 ->
+ case w of { GHC.Types.I# ww1 ->
case T4930.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 }
}
diff --git a/testsuite/tests/simplCore/should_compile/T5366.stdout b/testsuite/tests/simplCore/should_compile/T5366.stdout
index df0f9ba05d..735d059fb5 100644
--- a/testsuite/tests/simplCore/should_compile/T5366.stdout
+++ b/testsuite/tests/simplCore/should_compile/T5366.stdout
@@ -1 +1,2 @@
- case ds of _ [Occ=Dead] { Bar dt dt1 -> GHC.Types.I# dt }
+ case ds of { Bar dt [Occ=Once] _ [Occ=Dead] -> GHC.Types.I# dt }}]
+f = \ (ds :: Bar) -> case ds of { Bar dt dt1 -> GHC.Types.I# dt }
diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr
index f9c0215130..4598b3e8d1 100644
--- a/testsuite/tests/simplCore/should_compile/T7360.stderr
+++ b/testsuite/tests/simplCore/should_compile/T7360.stderr
@@ -12,21 +12,15 @@ T7360.$WFoo3 [InlPrag=INLINE] :: Int -> Foo
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=False,boring_ok=False)
Tmpl= \ (dt [Occ=Once!] :: Int) ->
- case dt of _ [Occ=Dead] { GHC.Types.I# dt [Occ=Once] ->
- T7360.Foo3 dt
- }}]
+ case dt of { GHC.Types.I# dt [Occ=Once] -> T7360.Foo3 dt }}]
T7360.$WFoo3 =
\ (dt [Occ=Once!] :: Int) ->
- case dt of _ [Occ=Dead] { GHC.Types.I# dt [Occ=Once] ->
- T7360.Foo3 dt
- }
+ case dt of { GHC.Types.I# dt [Occ=Once] -> T7360.Foo3 dt }
-- RHS size: {terms: 5, types: 2, coercions: 0}
fun1 [InlPrag=NOINLINE] :: Foo -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=<S,1*U>]
-fun1 =
- \ (x :: Foo) ->
- case x of _ [Occ=Dead] { __DEFAULT -> GHC.Tuple.() }
+fun1 = \ (x :: Foo) -> case x of { __DEFAULT -> GHC.Tuple.() }
-- RHS size: {terms: 2, types: 0, coercions: 0}
T7360.fun5 :: ()
diff --git a/testsuite/tests/simplCore/should_compile/T7865.stdout b/testsuite/tests/simplCore/should_compile/T7865.stdout
index b06e47d4b9..7cad614b6d 100644
--- a/testsuite/tests/simplCore/should_compile/T7865.stdout
+++ b/testsuite/tests/simplCore/should_compile/T7865.stdout
@@ -1,4 +1,4 @@
expensive [InlPrag=NOINLINE] :: Int -> Int
expensive =
- case expensive sc1 of _ [Occ=Dead] { GHC.Types.I# x ->
- (case expensive x of _ [Occ=Dead] { GHC.Types.I# x1 ->
+ case expensive sc1 of { GHC.Types.I# x ->
+ (case expensive x of { GHC.Types.I# x1 ->
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
index a1dc5144a7..441b4ed391 100644
--- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr
+++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
@@ -56,14 +56,11 @@ Roman.foo_$s$wgo =
(GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc sc) sc) sc) sc)
sc)
sc } in
- case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# sc1 0#)
- of _ [Occ=Dead] {
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# sc1 0#) of {
False ->
- case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# sc1 100#)
- of _ [Occ=Dead] {
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# sc1 100#) of {
False ->
- case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# sc1 500#)
- of _ [Occ=Dead] {
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# sc1 500#) of {
False -> Roman.foo_$s$wgo (GHC.Prim.+# m m) (GHC.Prim.-# sc1 1#);
True -> Roman.foo_$s$wgo m (GHC.Prim.-# sc1 3#)
};
@@ -82,10 +79,10 @@ Roman.$wgo [InlPrag=[0]] :: Maybe Int -> Maybe Int -> GHC.Prim.Int#
WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 30] 256 0}]
Roman.$wgo =
\ (w :: Maybe Int) (w1 :: Maybe Int) ->
- case w1 of _ [Occ=Dead] {
+ case w1 of {
Nothing -> case Roman.foo3 of wild1 { };
Just x ->
- case x of _ [Occ=Dead] { GHC.Types.I# ipv ->
+ case x of { GHC.Types.I# ipv ->
let {
m :: GHC.Prim.Int#
[LclId]
@@ -96,18 +93,15 @@ Roman.$wgo =
(GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# ipv ipv) ipv) ipv) ipv)
ipv)
ipv } in
- case w of _ [Occ=Dead] {
+ case w of {
Nothing -> Roman.foo_$s$wgo m 10#;
Just n ->
- case n of _ [Occ=Dead] { GHC.Types.I# x2 ->
- case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# x2 0#)
- of _ [Occ=Dead] {
+ case n of { GHC.Types.I# x2 ->
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<=# x2 0#) of {
False ->
- case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x2 100#)
- of _ [Occ=Dead] {
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x2 100#) of {
False ->
- case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x2 500#)
- of _ [Occ=Dead] {
+ case GHC.Prim.tagToEnum# @ Bool (GHC.Prim.<# x2 500#) of {
False -> Roman.foo_$s$wgo (GHC.Prim.+# m m) (GHC.Prim.-# x2 1#);
True -> Roman.foo_$s$wgo m (GHC.Prim.-# x2 3#)
};
@@ -167,7 +161,7 @@ foo :: Int -> Int
}}]
foo =
\ (n :: Int) ->
- case n of _ [Occ=Dead] { GHC.Types.I# ipv ->
+ case n of { GHC.Types.I# ipv ->
case Roman.foo_$s$wgo 6# ipv of ww { __DEFAULT -> GHC.Types.I# ww }
}