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/T23307c.hs | |
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/T23307c.hs')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T23307c.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T23307c.hs b/testsuite/tests/simplCore/should_compile/T23307c.hs new file mode 100644 index 0000000000..a0d4de1cfa --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T23307c.hs @@ -0,0 +1,7 @@ +module Foo where + +newtype Identity x = MkId x +newtype Fix f = MkFix (f (Fix f)) + +-- This test just checks that the compiler itself doesn't loop +data Loop = LCon {-# UNPACK #-} !(Fix Identity) |