From: simonmar Date: Thu, 6 Nov 2003 17:34:00 +0000 (+0000) Subject: [project @ 2003-11-06 17:34:00 by simonmar] X-Git-Tag: nhc98-1-18-release~449 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=774865f0a947d8bf764e7ec3957a23c981936f3b;p=ghc-base.git [project @ 2003-11-06 17:34:00 by simonmar] Doc wibbles --- diff --git a/Foreign/Storable.hs b/Foreign/Storable.hs index 78e2d4f..4c56b7a 100644 --- a/Foreign/Storable.hs +++ b/Foreign/Storable.hs @@ -113,7 +113,7 @@ class Storable a where -- @0@). The following equality holds, -- -- > peekElemOff addr idx = IOExts.fixIO $ \result -> - -- > peek (addr \`plusPtr\` (idx * sizeOf result)) + -- > peek (addr `plusPtr` (idx * sizeOf result)) -- -- Note that this is only a specification, not -- necessarily the concrete implementation of the @@ -124,19 +124,19 @@ class Storable a where -- values of the same kind. The following equality holds: -- -- > pokeElemOff addr idx x = - -- > poke (addr \`plusPtr\` (idx * sizeOf x)) x + -- > poke (addr `plusPtr` (idx * sizeOf x)) x peekByteOff :: Ptr b -> Int -> IO a -- ^ Read a value from a memory location given by a base -- address and offset. The following equality holds: -- - -- > peekByteOff addr off = peek (addr \`plusPtr\` off) + -- > peekByteOff addr off = peek (addr `plusPtr` off) pokeByteOff :: Ptr b -> Int -> a -> IO () -- ^ Write a value to a memory location given by a base -- address and offset. The following equality holds: -- - -- > pokeByteOff addr off x = poke (addr \`plusPtr\` off) x + -- > pokeByteOff addr off x = poke (addr `plusPtr` off) x peek :: Ptr a -> IO a -- ^ Read a value from the given memory location.