Moduleprimitive-addr-0.1.0.3Haskell2010
Data.Primitive.Addr
Primitive operations on machine addresses.
- 1 type
- 12 values
- Packageprimitive-addr-0.1.0.3
- Exports13
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceAddr.hs
Types
1 declarationAddress arithmetic
4 declarationsThe null address
Offset an address by the given number of bytes
Distance in bytes between two addresses. The result is only valid if the difference fits in an Int.
The remainder of the address and the integer.
Element access
3 declarationsRead a value from a memory position given by an address and an offset.
The memory block the address refers to must be immutable. The offset is in
elements of type a rather than in bytes.
Read a value from a memory position given by an address and an offset.
The offset is in elements of type a rather than in bytes.
Write a value to a memory position given by an address and an offset.
The offset is in elements of type a rather than in bytes.
Block operations
4 declarationscopyAddr Copy the given number of bytes from the second Addr to the first. The areas may not overlap.
copyAddrToByteArray Copy the given number of bytes from the Addr to the MutableByteArray. The areas may not overlap. This function is only available when compiling with GHC 7.8 or newer.
moveAddr Copy the given number of bytes from the second Addr to the first. The areas may overlap.
Fill a memory block of with the given value. The length is in
elements of type a rather than in bytes.