newAddrArray# and other things

Simon Marlow simonmar@microsoft.com
Mon, 28 Jan 2002 12:24:42 -0000


> Okay, one quick question:
>=20
>   what do i have to import to get newAddrArray#, readAddrArray#, etc.?

GlaExts (package lang) is currently the right place to get these from.

> And, secondly, a correction to the documentation:
>=20
>   under the "Allocation" section (7.2.14.1), It says:
>=20
>  newCharArray#   :: Int# -> State# s -> (# State# s,=20
> MutableByteArray# s
> elt #)
>  newIntArray#    :: Int# -> State# s -> (# State# s,=20
> MutableByteArray# s
> elt #)
>  newAddrArray#   :: Int# -> State# s -> (# State# s,=20
> MutableByteArray# s
> elt #)
>  newFloatArray#  :: Int# -> State# s -> (# State# s,=20
> MutableByteArray# s
> elt #)
>  newDoubleArray# :: Int# -> State# s -> (# State# s,=20
> MutableByteArray# s
> elt #)

Ok, I wouldn't be surprised if the documentation on the primitives is
incorrect and/or out of date.  We have vague plans to auto-generate this
stuff from the file fptools/ghc/compiler/prelude/primops.txt, which is
incedentally a better place to look to get the types of these things.

Cheers,=09
	Simon