Commit 58d78dc0 authored by Alan Zimmerman's avatar Alan Zimmerman
Browse files

Fix pretty printer test to nog generate stdout

It was doing a dump to stdout, which is not repeatable across platforms.
parent 499e4382
{-# OPTIONS -O -ddump-stranal #-}
module Dead1(foo) where
foo :: Int -> Int
......
Ppr012.hs:14:1: warning: [-Winline-rule-shadowing]
Ppr012.hs:12:1: warning: [-Winline-rule-shadowing]
Rule "bar/foo" may never fire because ‘foo’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘foo’
Ppr012.ppr.hs:11:11: warning: [-Winline-rule-shadowing]
Rule "bar/foo" may never fire because ‘foo’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘foo’
==================== Demand analysis ====================
Result size of Demand analysis
= {terms: 19, types: 8, coercions: 0}
-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule_sK3 :: GHC.Types.TrName
[LclId,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
$trModule_sK3 = GHC.Types.TrNameS "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule_sK4 :: GHC.Types.TrName
[LclId,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
$trModule_sK4 = GHC.Types.TrNameS "Dead1"#
-- RHS size: {terms: 3, types: 0, coercions: 0}
Dead1.$trModule :: GHC.Types.Module
[LclIdX,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Dead1.$trModule = GHC.Types.Module $trModule_sK3 $trModule_sK4
-- RHS size: {terms: 8, types: 3, coercions: 0}
foo :: Int -> Int
[LclIdX,
Arity=1,
Str=<S(S),1*U(U)>m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [20] 21 20}]
foo =
\ (n_axW [Dmd=<S(S),1*U(U)>] :: Int) ->
case n_axW of { GHC.Types.I# x_aKq [Dmd=<S,U>] ->
GHC.Types.I# (GHC.Prim.+# x_aKq 1#)
}
==================== Demand analysis ====================
Result size of Demand analysis
= {terms: 19, types: 8, coercions: 0}
-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule_sK3 :: GHC.Types.TrName
[LclId,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
$trModule_sK3 = GHC.Types.TrNameS "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule_sK4 :: GHC.Types.TrName
[LclId,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
$trModule_sK4 = GHC.Types.TrNameS "Dead1"#
-- RHS size: {terms: 3, types: 0, coercions: 0}
Dead1.$trModule :: GHC.Types.Module
[LclIdX,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Dead1.$trModule = GHC.Types.Module $trModule_sK3 $trModule_sK4
-- RHS size: {terms: 8, types: 3, coercions: 0}
foo :: Int -> Int
[LclIdX,
Arity=1,
Str=<S(S),1*U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (n_axW [Occ=Once!] :: Int) ->
case n_axW of { GHC.Types.I# x_aKq [Occ=Once] ->
GHC.Types.I# (GHC.Prim.+# x_aKq 1#)
}}]
foo =
\ (n_axW [Dmd=<S(S),1*U(U)>] :: Int) ->
case n_axW of { GHC.Types.I# x_aKq [Dmd=<S,U>] ->
GHC.Types.I# (GHC.Prim.+# x_aKq 1#)
}
==================== Demand analysis ====================
Result size of Demand analysis
= {terms: 19, types: 8, coercions: 0}
-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule_s1vS :: GHC.Types.TrName
[LclId,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
$trModule_s1vS = GHC.Types.TrNameS "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule_s1vT :: GHC.Types.TrName
[LclId,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
$trModule_s1vT = GHC.Types.TrNameS "Dead1"#
-- RHS size: {terms: 3, types: 0, coercions: 0}
Dead1.$trModule :: GHC.Types.Module
[LclIdX,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Dead1.$trModule = GHC.Types.Module $trModule_s1vS $trModule_s1vT
-- RHS size: {terms: 8, types: 3, coercions: 0}
foo :: Int -> Int
[LclIdX,
Arity=1,
Str=<S(S),1*U(U)>m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [20] 21 20}]
foo =
\ (n_a1jL [Dmd=<S(S),1*U(U)>] :: Int) ->
case n_a1jL of { GHC.Types.I# x_a1wf [Dmd=<S,U>] ->
GHC.Types.I# (GHC.Prim.+# x_a1wf 1#)
}
==================== Demand analysis ====================
Result size of Demand analysis
= {terms: 19, types: 8, coercions: 0}
-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule_s1vS :: GHC.Types.TrName
[LclId,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
$trModule_s1vS = GHC.Types.TrNameS "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0}
$trModule_s1vT :: GHC.Types.TrName
[LclId,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
$trModule_s1vT = GHC.Types.TrNameS "Dead1"#
-- RHS size: {terms: 3, types: 0, coercions: 0}
Dead1.$trModule :: GHC.Types.Module
[LclIdX,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Dead1.$trModule = GHC.Types.Module $trModule_s1vS $trModule_s1vT
-- RHS size: {terms: 8, types: 3, coercions: 0}
foo :: Int -> Int
[LclIdX,
Arity=1,
Str=<S(S),1*U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (n_a1jL [Occ=Once!] :: Int) ->
case n_a1jL of { GHC.Types.I# x_a1wf [Occ=Once] ->
GHC.Types.I# (GHC.Prim.+# x_a1wf 1#)
}}]
foo =
\ (n_a1jL [Dmd=<S(S),1*U(U)>] :: Int) ->
case n_a1jL of { GHC.Types.I# x_a1wf [Dmd=<S,U>] ->
GHC.Types.I# (GHC.Prim.+# x_a1wf 1#)
}
......@@ -9,6 +9,7 @@ test('Ppr008', normal, run_command, ['$MAKE -s --no-print-directory ppr008'])
test('Ppr009', normal, run_command, ['$MAKE -s --no-print-directory ppr009'])
test('Ppr010', normal, run_command, ['$MAKE -s --no-print-directory ppr010'])
test('Ppr011', normal, run_command, ['$MAKE -s --no-print-directory ppr011'])
#test('Ppr012', ignore_stdout, run_command, ['$MAKE -s --no-print-directory ppr012'])
test('Ppr012', normal, run_command, ['$MAKE -s --no-print-directory ppr012'])
test('Ppr013', normal, run_command, ['$MAKE -s --no-print-directory ppr013'])
test('Ppr014', normal, run_command, ['$MAKE -s --no-print-directory ppr014'])
......
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