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/T23307a.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/T23307a.hs')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T23307a.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T23307a.hs b/testsuite/tests/simplCore/should_compile/T23307a.hs new file mode 100644 index 0000000000..f02fee86b4 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T23307a.hs @@ -0,0 +1,7 @@ +module T23307a where + +data List a = Nil | Cons {-# UNPACK #-} !(Unconsed a) + -- This UNPACK should work + +data Unconsed a = Unconsed a !(List a) +data MUnconsed a = No | Yes {-# UNPACK #-} !(Unconsed a)
\ No newline at end of file |