From 5a535172d13b30c94766751d0bc21a494b8858ed Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Wed, 28 Sep 2022 16:36:08 +0200 Subject: Demand: Format Call SubDemands `Cn(sd)` as `C(n,sd)` (#22231) Justification in #22231. Short form: In a demand like `1C1(C1(L))` it was too easy to confuse which `1` belongs to which `C`. Now that should be more obvious. Fixes #22231 --- testsuite/tests/arityanal/should_compile/Arity01.stderr | 2 +- testsuite/tests/arityanal/should_compile/Arity02.stderr | 2 +- testsuite/tests/arityanal/should_compile/Arity04.stderr | 2 +- testsuite/tests/arityanal/should_compile/Arity05.stderr | 4 ++-- testsuite/tests/arityanal/should_compile/Arity06.stderr | 2 +- testsuite/tests/arityanal/should_compile/Arity08.stderr | 2 +- testsuite/tests/arityanal/should_compile/Arity11.stderr | 4 ++-- testsuite/tests/arityanal/should_compile/Arity14.stderr | 6 +++--- testsuite/tests/arityanal/should_compile/Arity15.stderr | 2 +- testsuite/tests/arityanal/should_compile/Arity16.stderr | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) (limited to 'testsuite/tests/arityanal/should_compile') diff --git a/testsuite/tests/arityanal/should_compile/Arity01.stderr b/testsuite/tests/arityanal/should_compile/Arity01.stderr index 40d65fe4ea..eba6d4bfca 100644 --- a/testsuite/tests/arityanal/should_compile/Arity01.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity01.stderr @@ -41,7 +41,7 @@ F1.s1 = GHC.Num.Integer.IS 3# -- RHS size: {terms: 8, types: 7, coercions: 0, joins: 0/0} s :: forall {t1} {t2}. Num t1 => (t1 -> t2) -> t2 -[GblId, Arity=2, Str=<1C1(L)>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [30 60] 50 0}] +[GblId, Arity=2, Str=<1C(1,L)>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [30 60] 50 0}] s = \ (@t) (@t1) ($dNum :: Num t) (f :: t -> t1) -> f (fromInteger @t $dNum F1.s1) -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity02.stderr b/testsuite/tests/arityanal/should_compile/Arity02.stderr index 8f9c4eec08..ee756cbf65 100644 --- a/testsuite/tests/arityanal/should_compile/Arity02.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity02.stderr @@ -9,7 +9,7 @@ F2.f1 = GHC.Num.Integer.IS 0# -- RHS size: {terms: 7, types: 6, coercions: 0, joins: 0/0} f2f :: forall {t1} {t2}. (t1 -> Integer -> t2) -> t1 -> t2 -[GblId, Arity=2, Str=<1C1(C1(L))>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)}] +[GblId, Arity=2, Str=<1C(1,C(1,L))>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)}] f2f = \ (@t) (@t1) (h :: t -> Integer -> t1) (x :: t) -> h x F2.f1 -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity04.stderr b/testsuite/tests/arityanal/should_compile/Arity04.stderr index cd50e21662..e1ade4ec11 100644 --- a/testsuite/tests/arityanal/should_compile/Arity04.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity04.stderr @@ -15,7 +15,7 @@ f4g = \ (y :: Int) -> case y of { GHC.Types.I# x -> GHC.Types.I# (GHC.Prim.+# x Rec { -- RHS size: {terms: 17, types: 6, coercions: 0, joins: 0/0} f4h [Occ=LoopBreaker] :: (Int -> Int) -> Int -> Int -[GblId, Arity=2, Str=<1C1(L)><1P(SL)>, Unf=OtherCon []] +[GblId, Arity=2, Str=<1C(1,L)><1P(SL)>, Unf=OtherCon []] f4h = \ (f :: Int -> Int) (x :: Int) -> case x of wild { GHC.Types.I# x1 -> diff --git a/testsuite/tests/arityanal/should_compile/Arity05.stderr b/testsuite/tests/arityanal/should_compile/Arity05.stderr index 17a0fb668a..8632c955be 100644 --- a/testsuite/tests/arityanal/should_compile/Arity05.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity05.stderr @@ -9,12 +9,12 @@ F5.f5g1 = GHC.Num.Integer.IS 1# -- RHS size: {terms: 12, types: 9, coercions: 0, joins: 0/0} f5g :: forall {a} {t}. Num a => (t -> a) -> t -> a -[GblId, Arity=3, Str=, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 60 0] 90 0}] +[GblId, Arity=3, Str=, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 60 0] 90 0}] f5g = \ (@a) (@t) ($dNum :: Num a) (h :: t -> a) (z :: t) -> + @a $dNum (h z) (fromInteger @a $dNum F5.f5g1) -- RHS size: {terms: 17, types: 12, coercions: 0, joins: 0/0} f5h :: forall {a} {t}. Num a => (t -> a) -> t -> (t -> a) -> a -[GblId, Arity=4, Str=, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [90 60 0 60] 150 0}] +[GblId, Arity=4, Str=, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [90 60 0 60] 150 0}] f5h = \ (@a) (@t) ($dNum :: Num a) (f :: t -> a) (x :: t) (g :: t -> a) -> + @a $dNum (f x) (+ @a $dNum (g x) (fromInteger @a $dNum F5.f5g1)) -- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity06.stderr b/testsuite/tests/arityanal/should_compile/Arity06.stderr index 88240eea38..131d0331a9 100644 --- a/testsuite/tests/arityanal/should_compile/Arity06.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity06.stderr @@ -9,7 +9,7 @@ F6.f6f1 = 0 -- RHS size: {terms: 7, types: 6, coercions: 0, joins: 0/0} f6f :: forall {t1} {t2}. (t1 -> Integer -> t2) -> t1 -> t2 -[GblId, Arity=2, Str=<1C1(C1(L))>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)}] +[GblId, Arity=2, Str=<1C(1,C(1,L))>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)}] f6f = \ (@t) (@t1) (h :: t -> Integer -> t1) (x :: t) -> h x F6.f6f1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity08.stderr b/testsuite/tests/arityanal/should_compile/Arity08.stderr index 9885d5f158..22dcaf10fe 100644 --- a/testsuite/tests/arityanal/should_compile/Arity08.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity08.stderr @@ -4,7 +4,7 @@ Result size of Tidy Core = {terms: 24, types: 18, coercions: 0, joins: 0/0} -- RHS size: {terms: 20, types: 10, coercions: 0, joins: 0/0} f8f :: forall {p}. Num p => Bool -> p -> p -> p -[GblId, Arity=4, Str=<1L>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [90 30 0 0] 140 0}] +[GblId, Arity=4, Str=<1L>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [90 30 0 0] 140 0}] f8f = \ (@p) ($dNum :: Num p) (b :: Bool) (x :: p) (y :: p) -> case b of { diff --git a/testsuite/tests/arityanal/should_compile/Arity11.stderr b/testsuite/tests/arityanal/should_compile/Arity11.stderr index 82b162e531..982f7ad58d 100644 --- a/testsuite/tests/arityanal/should_compile/Arity11.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity11.stderr @@ -53,7 +53,7 @@ F11.fib1 = GHC.Num.Integer.IS 0# -- RHS size: {terms: 54, types: 27, coercions: 0, joins: 0/5} fib :: forall {t} {a}. (Eq t, Num t, Num a) => t -> a -[GblId, Arity=4, Str=, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 150 60 0] 480 0}] +[GblId, Arity=4, Str=, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 150 60 0] 480 0}] fib = \ (@t) (@a) ($dEq :: Eq t) ($dNum :: Num t) ($dNum1 :: Num a) (eta :: t) -> let { @@ -73,7 +73,7 @@ fib [LclId] lvl3 = fromInteger @t $dNum F11.fib1 } in letrec { - fib4 [Occ=LoopBreaker, Dmd=SCS(L)] :: t -> a + fib4 [Occ=LoopBreaker, Dmd=SC(S,L)] :: t -> a [LclId, Arity=1, Str=, Unf=OtherCon []] fib4 = \ (ds :: t) -> diff --git a/testsuite/tests/arityanal/should_compile/Arity14.stderr b/testsuite/tests/arityanal/should_compile/Arity14.stderr index 6fccde58a1..1f08b32e9a 100644 --- a/testsuite/tests/arityanal/should_compile/Arity14.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity14.stderr @@ -14,7 +14,7 @@ F14.f2 = GHC.Num.Integer.IS 1# -- RHS size: {terms: 36, types: 23, coercions: 0, joins: 0/3} f14 :: forall {t}. (Ord t, Num t) => t -> t -> t -> t -[GblId, Arity=4, Str=, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [30 90 0 0] 310 0}] +[GblId, Arity=4, Str=, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [30 90 0 0] 310 0}] f14 = \ (@t) ($dOrd :: Ord t) ($dNum :: Num t) (eta :: t) (eta1 :: t) -> let { @@ -22,7 +22,7 @@ f14 [LclId] lvl = fromInteger @t $dNum F14.f2 } in letrec { - f3 [Occ=LoopBreaker, Dmd=SCS(C1(L))] :: t -> t -> t -> t + f3 [Occ=LoopBreaker, Dmd=SC(S,C(1,L))] :: t -> t -> t -> t [LclId, Arity=2, Str=, Unf=OtherCon []] f3 = \ (n :: t) (x :: t) -> @@ -30,7 +30,7 @@ f14 False -> F14.f1 @t; True -> let { - v [Dmd=LCS(L)] :: t -> t + v [Dmd=LC(S,L)] :: t -> t [LclId] v = f3 n (+ @t $dNum x lvl) } in \ (y :: t) -> v (+ @t $dNum x y) diff --git a/testsuite/tests/arityanal/should_compile/Arity15.stderr b/testsuite/tests/arityanal/should_compile/Arity15.stderr index 689939ffef..59ef84cc6c 100644 --- a/testsuite/tests/arityanal/should_compile/Arity15.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity15.stderr @@ -9,7 +9,7 @@ F15.f15f1 = 1 -- RHS size: {terms: 4, types: 3, coercions: 0, joins: 0/0} f15f :: forall {t}. (Integer -> t) -> t -[GblId, Arity=1, Str=<1C1(L)>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}] +[GblId, Arity=1, Str=<1C(1,L)>, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}] f15f = \ (@t) (h :: Integer -> t) -> h F15.f15f1 -- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity16.stderr b/testsuite/tests/arityanal/should_compile/Arity16.stderr index 292f3808f7..2a495dd1f4 100644 --- a/testsuite/tests/arityanal/should_compile/Arity16.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity16.stderr @@ -27,7 +27,7 @@ lvl1 = Control.Exception.Base.patError @GHC.Types.LiftedRep @() lvl Rec { -- RHS size: {terms: 31, types: 32, coercions: 0, joins: 0/0} zipWith2 [Occ=LoopBreaker] :: forall {t1} {t2} {a}. (t1 -> t2 -> a) -> [t1] -> [t2] -> [a] -[GblId, Arity=3, Str=<1L><1L>, Unf=OtherCon []] +[GblId, Arity=3, Str=<1L><1L>, Unf=OtherCon []] zipWith2 = \ (@t) (@t1) (@a) (f :: t -> t1 -> a) (ds :: [t]) (ds1 :: [t1]) -> case ds of { -- cgit v1.2.1