This library is DEPRECATED. Use Ptr (see Section 4.29) instead.
data Addr -- abstract handle for memory addresses -- instance of: Eq, Ord, Show, Typeable nullAddr :: Addr alignAddr :: Addr -> Int -> Addr plusAddr :: Addr -> Int -> Addr minusAddr :: Addr -> Addr -> Int |
The following specifies the behaviour of the four function definitions.
The constant nullAddr contains a distinguished value of Addr that is not associated with a valid memory location.
Given an arbitrary address and an alignment constraint, alignAddr yields the next higher address that fulfills the alignment constraint. An alignment constraint x is fulfilled by any address divisible by x. This operation is idempotent.
Advances the given address by the given address offset.
Computes the offset required to get from the first to the second argument. We have
a2 == a1 `plusAddr` (a2 `minusAddr` a1) |
The following definition is available to C programs inter-operating with Haskell code when including the header HsFFI.h.
typedef void* HsAddr; /* C representation of an Addr */ |