diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-04-28 00:29:04 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-05-13 14:58:34 -0400 |
commit | 902f0730b4c50f39b7767a346be324c98bf7a8a6 (patch) | |
tree | f811093f39fa207770c6f24e97f76bbf4e68e588 /testsuite/tests/simplCore/should_compile/T23307.stderr | |
parent | 8a0d45f7d846e92cf4b6641fd8c67606412cdb3a (diff) | |
download | haskell-902f0730b4c50f39b7767a346be324c98bf7a8a6.tar.gz |
Make GHC.Types.Id.Make.shouldUnpackTy a bit more clever
As #23307, GHC.Types.Id.Make.shouldUnpackTy was leaving money on the
table, failing to unpack arguments that are perfectly unpackable.
The fix is pretty easy; see Note [Recursive unboxing]
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T23307.stderr')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T23307.stderr | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T23307.stderr b/testsuite/tests/simplCore/should_compile/T23307.stderr new file mode 100644 index 0000000000..f42016e9a8 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T23307.stderr @@ -0,0 +1,72 @@ + +==================== Tidy Core ==================== +Result size of Tidy Core + = {terms: 29, types: 40, coercions: 0, joins: 0/0} + +-- RHS size: {terms: 8, types: 9, coercions: 0, joins: 0/0} +T23307.$WYes [InlPrag=INLINE[final] CONLIKE] + :: forall a. Unconsed a %1 -> MUnconsed a +[GblId[DataConWrapper], + Arity=1, + Str=<SL>, + Unf=Unf{Src=StableSystem, TopLvl=True, + Value=True, ConLike=True, WorkFree=True, Expandable=True, + Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) + Tmpl= \ (@a) (conrep [Occ=Once1!] :: Unconsed a) -> + case conrep of { Unconsed unbx [Occ=Once1] unbx1 [Occ=Once1] -> + T23307.Yes @a unbx unbx1 + }}] +T23307.$WYes + = \ (@a) (conrep [Occ=Once1!] :: Unconsed a) -> + case conrep of { Unconsed unbx [Occ=Once1] unbx1 [Occ=Once1] -> + T23307.Yes @a unbx unbx1 + } + +-- RHS size: {terms: 9, types: 7, coercions: 0, joins: 0/0} +T23307.$WUnconsed [InlPrag=INLINE[final] CONLIKE] + :: forall a. a %1 -> Stream a %1 -> Unconsed a +[GblId[DataConWrapper], + Arity=2, + Str=<L><SL>, + Unf=Unf{Src=StableSystem, TopLvl=True, + Value=True, ConLike=True, WorkFree=True, Expandable=True, + Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False) + Tmpl= \ (@a) + (conrep [Occ=Once1] :: a) + (conrep1 [Occ=Once1] :: Stream a) -> + case conrep1 of conrep2 [Occ=Once1] { __DEFAULT -> + T23307.Unconsed @a conrep conrep2 + }}] +T23307.$WUnconsed + = \ (@a) + (conrep [Occ=Once1] :: a) + (conrep1 [Occ=Once1] :: Stream a) -> + case conrep1 of conrep2 [Occ=Once1] { __DEFAULT -> + T23307.Unconsed @a conrep conrep2 + } + +-- RHS size: {terms: 9, types: 7, coercions: 0, joins: 0/0} +T23307.$WCons [InlPrag=INLINE[final] CONLIKE] + :: forall a. a %1 -> Stream a %1 -> Stream a +[GblId[DataConWrapper], + Arity=2, + Str=<L><SL>, + Unf=Unf{Src=StableSystem, TopLvl=True, + Value=True, ConLike=True, WorkFree=True, Expandable=True, + Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False) + Tmpl= \ (@a) + (conrep [Occ=Once1] :: a) + (conrep1 [Occ=Once1] :: Stream a) -> + case conrep1 of conrep2 [Occ=Once1] { __DEFAULT -> + T23307.Cons @a conrep conrep2 + }}] +T23307.$WCons + = \ (@a) + (conrep [Occ=Once1] :: a) + (conrep1 [Occ=Once1] :: Stream a) -> + case conrep1 of conrep2 [Occ=Once1] { __DEFAULT -> + T23307.Cons @a conrep conrep2 + } + + + |