summaryrefslogtreecommitdiff
path: root/utils/genprimopcode
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-19 11:43:30 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-12-03 07:11:33 -0500
commit705a16df02411ec2445c9a254396a93cabe559ef (patch)
treeaae70d73be2d785fd85951ef3813673f2b37e695 /utils/genprimopcode
parent5a4b8d0cf2ff83d1a04826b9624fffec7b9a5683 (diff)
downloadhaskell-705a16df02411ec2445c9a254396a93cabe559ef.tar.gz
Make BCO# lifted
In #17424 Simon PJ noted that there is a potentially unsafe occurrence of unsafeCoerce#, coercing from an unlifted to lifted type. However, nowhere in the compiler do we assume that a BCO# is not a thunk. Moreover, in the case of a CAF the result returned by `createBCO` *will* be a thunk (as noted in [Updatable CAF BCOs]). Consequently it seems better to rather make BCO# a lifted type and rename it to BCO.
Diffstat (limited to 'utils/genprimopcode')
-rw-r--r--utils/genprimopcode/Main.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/genprimopcode/Main.hs b/utils/genprimopcode/Main.hs
index b99f36dad2..ef8e284593 100644
--- a/utils/genprimopcode/Main.hs
+++ b/utils/genprimopcode/Main.hs
@@ -857,7 +857,7 @@ ppType (TyApp (TyCon "ByteArray#") []) = "byteArrayPrimTy"
ppType (TyApp (TyCon "RealWorld") []) = "realWorldTy"
ppType (TyApp (TyCon "ThreadId#") []) = "threadIdPrimTy"
ppType (TyApp (TyCon "ForeignObj#") []) = "foreignObjPrimTy"
-ppType (TyApp (TyCon "BCO#") []) = "bcoPrimTy"
+ppType (TyApp (TyCon "BCO") []) = "bcoPrimTy"
ppType (TyApp (TyCon "Compact#") []) = "compactPrimTy"
ppType (TyApp (TyCon "()") []) = "unitTy" -- unitTy is TysWiredIn's name for ()