summaryrefslogtreecommitdiff
path: root/ghc/docs/users_guide/ByteArray.sgml
diff options
context:
space:
mode:
authorrrt <unknown>2000-01-05 11:06:24 +0000
committerrrt <unknown>2000-01-05 11:06:24 +0000
commitbb0b4b694e2f9cc87c195ca176ed522b1fe2ff8e (patch)
tree90ad35b9dbf9dafffca726c20d2c4231fa7624f5 /ghc/docs/users_guide/ByteArray.sgml
parent5ca77490a603e0175bb717343884533ad8de017d (diff)
downloadhaskell-bb0b4b694e2f9cc87c195ca176ed522b1fe2ff8e.tar.gz
[project @ 2000-01-05 11:06:23 by rrt]
Documentation changed from LinuxDoc to DocBook format, and license added to the user guide.
Diffstat (limited to 'ghc/docs/users_guide/ByteArray.sgml')
-rw-r--r--ghc/docs/users_guide/ByteArray.sgml104
1 files changed, 68 insertions, 36 deletions
diff --git a/ghc/docs/users_guide/ByteArray.sgml b/ghc/docs/users_guide/ByteArray.sgml
index 69fae3e583..e378be3c6a 100644
--- a/ghc/docs/users_guide/ByteArray.sgml
+++ b/ghc/docs/users_guide/ByteArray.sgml
@@ -1,45 +1,77 @@
-<sect2>The <idx/ByteArray/ interface
-<label id="sec:byte-array">
-<p>
-<nidx>ByteArray interface (GHC extensions)</nidx>
+<Sect2 id="sec-byte-array">
+<Title>The ByteArray
+<IndexTerm><Primary>ByteArray</Primary></IndexTerm>
+interface
+</Title>
-<tt/ByteArray/s are chunks of immutable Haskell heap:
+<Para>
+<IndexTerm><Primary>ByteArray interface (GHC extensions)</Primary></IndexTerm>
+</Para>
-<tscreen><code>
+<Para>
+<Literal>ByteArray</Literal>s are chunks of immutable Haskell heap:
+</Para>
+
+<Para>
+
+<ProgramListing>
data ByteArray ix -- abstract
-- instance of: Eq, CCallable.
-newByteArray :: Ix ix => (ix,ix) -> ST s (ByteArray ix)
-
-indexCharArray :: Ix ix => ByteArray ix -> ix -> Char
-indexIntArray :: Ix ix => ByteArray ix -> ix -> Int
-indexAddrArray :: Ix ix => ByteArray ix -> ix -> Addr
-indexFloatArray :: Ix ix => ByteArray ix -> ix -> Float
-indexDoubleArray :: Ix ix => ByteArray ix -> ix -> Double
-
-sizeofByteArray :: Ix ix => ByteArray ix -> Int
-</code></tscreen>
-<nidx/newByteArray/
-<nidx/indexCharArray/
-<nidx/indexIntArray/
-<nidx/indexAddrArray/
-<nidx/indexFloatArray/
-<nidx/indexDoubleArray/
-<nidx/indexDoubleArray/
-<nidx/sizeofByteArray/
-
-<bf/Remarks:/
-
-<itemize>
-<item>
-The operation <tt/newByteArray/ creates a byte array of length
-equal to the range of its indices <em/in bytes/.
-<item>
-<tt/sizeofByteArray/ returns the size of the byte array, <em/in bytes/.
-
-<item>
+newByteArray :: Ix ix =&#62; (ix,ix) -&#62; ST s (ByteArray ix)
+
+indexCharArray :: Ix ix =&#62; ByteArray ix -&#62; ix -&#62; Char
+indexIntArray :: Ix ix =&#62; ByteArray ix -&#62; ix -&#62; Int
+indexAddrArray :: Ix ix =&#62; ByteArray ix -&#62; ix -&#62; Addr
+indexFloatArray :: Ix ix =&#62; ByteArray ix -&#62; ix -&#62; Float
+indexDoubleArray :: Ix ix =&#62; ByteArray ix -&#62; ix -&#62; Double
+
+sizeofByteArray :: Ix ix =&#62; ByteArray ix -&#62; Int
+</ProgramListing>
+
+<IndexTerm><Primary>newByteArray</Primary></IndexTerm>
+<IndexTerm><Primary>indexCharArray</Primary></IndexTerm>
+<IndexTerm><Primary>indexIntArray</Primary></IndexTerm>
+<IndexTerm><Primary>indexAddrArray</Primary></IndexTerm>
+<IndexTerm><Primary>indexFloatArray</Primary></IndexTerm>
+<IndexTerm><Primary>indexDoubleArray</Primary></IndexTerm>
+<IndexTerm><Primary>indexDoubleArray</Primary></IndexTerm>
+<IndexTerm><Primary>sizeofByteArray</Primary></IndexTerm>
+</Para>
+
+<Para>
+<Emphasis>Remarks:</Emphasis>
+</Para>
+
+<Para>
+
+<ItemizedList>
+<ListItem>
+
+<Para>
+The operation <Literal>newByteArray</Literal> creates a byte array of length
+equal to the range of its indices <Emphasis>in bytes</Emphasis>.
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
+<Literal>sizeofByteArray</Literal> returns the size of the byte array, <Emphasis>in bytes</Emphasis>.
+
+</Para>
+</ListItem>
+<ListItem>
+
+<Para>
Equality on byte arrays is value equality, not pointer equality (as is
the case for its mutable variant.) Two byte arrays are equal if
they're of the same length and they're pairwise equal.
-</itemize>
+</Para>
+</ListItem>
+
+</ItemizedList>
+
+</Para>
+
+</Sect2>