summaryrefslogtreecommitdiff
path: root/compiler/prelude
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-10-03 11:03:36 +0100
committerIan Lynagh <igloo@earth.li>2011-10-03 11:06:01 +0100
commitaff9d6908525567cdeca09c7ef40bee34459cd31 (patch)
treece1e0dc09a1017597a8922dedc41c4d8dcf4c20b /compiler/prelude
parent25f8f25a494f765d644a7dd1ead5c0a5058b8c36 (diff)
downloadhaskell-aff9d6908525567cdeca09c7ef40bee34459cd31.tar.gz
Handle HValues slightly nicer
We now have addrToAny# rather than addrToHValue#, and both addrToAny# and mkApUpd0# return "Any" rather than "a". This makes it a little easier to see what's going on, and fixes a warning in ByteCodeLink.
Diffstat (limited to 'compiler/prelude')
-rw-r--r--compiler/prelude/TysPrim.lhs5
-rw-r--r--compiler/prelude/primops.txt.pp8
2 files changed, 8 insertions, 5 deletions
diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs
index 64f413d2ff..3f54172ecf 100644
--- a/compiler/prelude/TysPrim.lhs
+++ b/compiler/prelude/TysPrim.lhs
@@ -67,7 +67,7 @@ module TysPrim(
eqPrimTyCon, -- ty1 ~# ty2
-- * Any
- anyTyCon, anyTyConOfKind, anyTypeOfKind
+ anyTy, anyTyCon, anyTyConOfKind, anyTypeOfKind
) where
#include "HsVersions.h"
@@ -671,6 +671,9 @@ This commit uses
anyTyConName :: Name
anyTyConName = mkPrimTc (fsLit "Any") anyTyConKey anyTyCon
+anyTy :: Type
+anyTy = mkTyConTy anyTyCon
+
anyTyCon :: TyCon
anyTyCon = mkLiftedPrimTyCon anyTyConName liftedTypeKind 0 PtrRep
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index 8cad832350..09d2dd3361 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -1761,14 +1761,14 @@ section "Bytecode operations"
primtype BCO#
{Primitive bytecode type.}
-primop AddrToHValueOp "addrToHValue#" GenPrimOp
- Addr# -> (# a #)
- {Convert an {\tt Addr\#} to a followable type.}
+primop AddrToAnyOp "addrToAny#" GenPrimOp
+ Addr# -> (# Any #)
+ {Convert an {\tt Addr\#} to a followable Any type.}
with
code_size = 0
primop MkApUpd0_Op "mkApUpd0#" GenPrimOp
- BCO# -> (# a #)
+ BCO# -> (# Any #)
with
out_of_line = True