[project @ 2001-10-17 11:26:04 by simonpj]
authorsimonpj <unknown>
Wed, 17 Oct 2001 11:26:04 +0000 (11:26 +0000)
committersimonpj <unknown>
Wed, 17 Oct 2001 11:26:04 +0000 (11:26 +0000)
commitfd94f66371dfd4a2c6694d933374a3a5aa7bd7b4
tree20c60c63bca61fff856eca8e2688ee6c8efbb2e1
parent95e31ad5d5dbb3f3a3994fc267f6ed7591b86d17
[project @ 2001-10-17 11:26:04 by simonpj]
-------------------------------------------
nullAddr# fix for the HEAD
-------------------------------------------

*** DO NOT MERGE ***

nullAddr# is simply a name for (Lit nullAddrLit).  Up
to now it has been a PrimOp with the rather stange type
nullAddr# :: Int# -> Addr#
which discards its argument.  (I think the problem with
nullary primops is to do with the top-level bindings in
PrelPrimOpWrappers.)   And there was a RULE in PrelRules
to rewrite
nullAddr _ ==> nullAddrLit

It's excessive to make it a PrimOp.  We can just treat it
like unsafeCoerce#, which is made in MkId.lhs.   So I've
done that, and given it the more sensible type
nullAddr# :: Addr#

I fixed all the occurrences I could find.
ghc/compiler/basicTypes/MkId.lhs
ghc/compiler/prelude/PrelNames.lhs
ghc/compiler/prelude/PrelRules.lhs
ghc/compiler/prelude/primops.txt.pp
ghc/lib/std/PrelGHC.hi-boot.pp
ghc/lib/std/PrelPtr.lhs