[Git][ghc/ghc][wip/andreask/tc_fixed_tuple] Ensure `tcHasFixedRuntimeRep (# #)` returns True.

Andreas Klebinger (@AndreasK) gitlab at gitlab.haskell.org
Thu May 16 00:10:39 UTC 2024



Andreas Klebinger pushed to branch wip/andreask/tc_fixed_tuple at Glasgow Haskell Compiler / GHC


Commits:
0fd02169 by Andreas Klebinger at 2024-05-16T01:54:54+02:00
Ensure `tcHasFixedRuntimeRep (# #)` returns True.

- - - - -


1 changed file:

- compiler/GHC/Core/TyCon.hs


Changes:

=====================================
compiler/GHC/Core/TyCon.hs
=====================================
@@ -2408,7 +2408,9 @@ tcHasFixedRuntimeRep tc@(TyCon { tyConDetails = details })
                -- the representation be fully-known, including levity variables.
                -- This might be relaxed in the future (#15532).
 
-       TupleTyCon { tup_sort = tuple_sort } -> isBoxed (tupleSortBoxity tuple_sort)
+       TupleTyCon { tup_sort = tuple_sort } -> isBoxed (tupleSortBoxity tuple_sort) ||
+                                               -- (# #) also has fixed rep.
+                                               tyConArity tc == 0
 
        SumTyCon {} -> False   -- only unboxed sums here
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0fd021698e95f2c885cafeefd969a4ef51aee409

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0fd021698e95f2c885cafeefd969a4ef51aee409
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240515/e6bc8d95/attachment.html>


More information about the ghc-commits mailing list